call function 'RKE_CREATE_BATCH_INPUT'
exporting
erkrs = p_erkrs
group = p_sesion
user = sy-uname
tables
ep_tab = it_batchinput
fieldtab = it_dbtable
exceptions
no_ep_found = 1
others = 2.
submit rsbdcsub exporting list to memory
with bis = sy-datum
with mappe = p_sesion
with von = sy-datum
with z_verarb = true
and return.
Cons of using the FM 'RKE_CREATE_BATCH_INPUT'
call function 'BAPI_COPAACTUALS_POSTCOSTDATA'
exporting
operatingconcern = i_erkrs
testrun = i_testrun
tables
inputdata = t_dat
fieldlist = t_field
return = t_return.
The above BAPI provides the below advantages for postings :
f_dat-record_id = w_recno.
f_dat-fieldname = 'WWTP'.
f_dat-value = w_bukrs.
append f_dat to t_dat.
clear f_dat.
f_dat-record_id = w_recno.
f_dat-fieldname = 'WWACT'.
f_dat-value = <fs_final>-wwact.
append f_dat to t_dat.
clear f_dat.
f_dat-record_id = w_recno.
f_dat-fieldname = 'WWAT'.
f_dat-value = <fs_final>-wwat.
append f_dat to t_dat.
clear f_dat.
f_dat-record_id = w_recno.
f_dat-fieldname = 'VRGAR'.
f_dat-value = 'J'.
append f_dat to t_dat.
clear: f_field.
f_field-fieldname = 'WWTP'.
append f_field to i_field.
clear: f_field.
f_field-fieldname = 'WWACT'.
append f_field to i_field.
clear: f_field.
f_field-fieldname = 'WWAT'.
append f_field to i_field.
clear: f_field.
f_field-fieldname = 'VRGAR'.
append f_field to i_field.
Call function 'BAPI_COPAACTUALS_POSTCOSTDATA'
exporting
operatingconcern = i_erkrs
testrun = i_testrun
tables
inputdata = t_dat
fieldlist = t_field
return = t_return.
If the posting is successful
if sy-subrc is initial .
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
Endif.
SAP standard Report for testing the above BAPI:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |