Have you were lacking sometimes the documentation of a FM or BAPI or a manual how to do things that should be possible to do easily but you cannot find it nowhere? If yes I hope you can find what you're ...
If you know CMD_EI_API class, you are aware of its power. It's very helpful for the manipulation of customer master data, all master data including contacts. I have played with this class many times and ...
I'm big fan of CMD_EI_API and VMD_EI_API classes. I use them to create, update and delete customer and vendor master data, including contact persons, partners and all data you have in XD02/XK02 transaction. ...
Our characteristics update screen was displayed, data was changes so we need to read the reference data and put the values into BAPI structures in order to be able to save the values to database. I will ...
Following the example of downloading exchange rates from Central Bank Of Turkey using transformations, please find bellow the same way for National Bank of Poland.
Again, lets create an RFC destination ...
... XML from bank site into internal table, which can be then used inside your code to populate values of BAPI_EXCHANGERATE_CREATE FM.
There are few ways to download the XML to your ABAP code, I prefer ...
...
c_type-final_type = | type lenght |.
else.
c_type-final_type = | type |.
endif.
endmethod.
endclass.
In the example of usage I'll use sample JSON from TFS API ...
...
The conclusion is: do not assume that if something is workning in standard transaction, will work also in BAPI without additional settings :-)
Bellow you can find piece of code which I used ...
Everybody sends mails from SAP, some are still using old FM SO_NEW_DOCUMENT_ATT_SEND_API1 but some CL_BCS class. This class is really powerful but it has one disadvantage - it does commit work, and not ...
... message variables (MSGNO, MSGID, MSGV1, .. etc) so you can also easily use it together with BAPIs and return tables. I'd say with this method your code can look cleaner than before and for sure ...
...
data: gt_return type bapiret2_t.
data: gs_return type bapiret2.
data: g_error type c.
field-symbols: like line of gt_assignment.
field-symbols: like line of gt_plan.
selection-screen begin of block exc with frame title text-exc. ...
...
* TABLES
* IESDUS = IESDUS
. 2. You create MM documents using BAPI and you want that next time you open MM t-code which is used to display/edit this document then your document appears ...
... there. Sometimes not last but one of the lasts and you want to make it always last. You create MM documents using BAPI and you want that next time you open MM t-code which is used to display/edit this ...
It may happen that you'll need to do select or loop on a base of the field which is kept in lower case, but you don't know exactly what's the value o field. In such case you may want to build ...
Now it's time to save the values entered into database. I will use here previously created method to move data from reference structure to BAPI tables, then I will read values from database to see ...
... zcl_abapblog_com_classific=>clear_initial_line_api_vari to delete initial line for multiple values characteristics zcl_abapblog_com_classific=>move_ref_data_to_screen_val to move reference data to update ...
... IT_VALUES TYPE TT_API_VALI -> screen values table
I_ATNAM TYPE API_VALI-ATNAM -> Characteristic Name Changing: C_DATA TYPE REF TO DATA Exceptions: NO_DATA_TO_CHANGE Implementation: method move_screen_val_to_ref_data. ...
Before we can call the screen with the characteristic value to change we need to convert data from our reference data structure to table of type TT_API_VALI. Following method shows how to do it. Importing: ...
...
Importing: IT_API_CHAR TYPE TT_API_CHAR -> Table type for structure api_char_tab Implementation: method clear_initial_line_api_vari.
field-symbols: type any table.
data: mt_api_vali type tt_api_vali. ...
... my reference data structure to bapi tables (in order to save it) - method to save characteristic value - method to convert values from standard type (date, char, number, currency) to characteristic value ...
... in part 1. To get the characteristics values for an object I will use FM BAPI_OBJCL_GETDETAIL, then using field-symbols I will move the data from its result tables to our structure. I will use also cl_abap_typedescr ...
... or method which will do it for you so you can keep the logic in each of your program without doing maual work. To create the structure of the class I will use FM BAPI_CLASS_READ to read class data, ...