data: new_instance like inob-cuobj.
data: functionkey like sy-ucomm.
data: et_values type table of ibvalue0.
data: wa_et_values like line of et_values.
*EXCEPTIONS
*INVALID_INSTANCE = 1
*INSTANCE_IS_A_CLASSIFICATION = 2
*OTHERS = 3
.
if sy-subrc 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*Ausgabe
loop at et_values into wa_et_values.
write: / wa_et_values-atinn,
wa_et_values-atwrt.
endloop.
*******************
2. create orders
at the moment I use a material which is konfigured... in the future I get the values from a z table.... ( create by step 1 )
Code:
********
report zzalr_order_mv .
*MV Bestellen fur Online Ordering
data: g_cuobj like mara-cuobf.
*
data: et_values type table of ibvalue0.
data: wa_et_values like line of et_values.
data: order_header_in like bapisdhead.
data:
wa_order_items_in like bapiitemin,
it_order_items_in type table of bapiitemin,
wa_order_partners like bapipartnr,
it_order_partners type table of bapipartnr,
wa_order_items_out like bapiitemex,
it_order_items_out type table of bapiitemex,
wa_order_cfgs_ref like bapicucfg,
it_order_cfgs_ref type table of bapicucfg,
wa_order_cfgs_inst like bapicuins,
it_order_cfgs_inst type table of bapicuins,
wa_order_cfgs_part_of like bapicuprt,
it_order_cfgs_part_of type table of bapicuprt,
wa_order_cfgs_value like bapicuval,
it_order_cfgs_value type table of bapicuval.
data: g_wa_bapi_return1 like bapireturn1.
data: bapi_vbeln like bapivbeln-vbeln.
data: h_atnam like cabn-atnam.
parameters: p_matnr like mara-matnr default '000000000309120112'.
parameters: p_kmat like mara-matnr default '000000000309120110'.
parameters: p_buchen type flag default 'X'.
start-of-selection.
select single cuobf from mara into g_cuobj where
matnr = p_matnr.
*Auslesen der Config
call function 'CUCB_GET_VALUES_FROM_INSTANCE'
exporting
iv_instance = g_cuobj
*IS_BUSINESS_OBJECT =
*IV_MOMENT =
importing
et_values = et_values
*EXCEPTIONS
*INVALID_INSTANCE = 1
*INSTANCE_IS_A_CLASSIFICATION = 2
*OTHERS = 3
.
if sy-subrc 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.