Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_SALESORDER_CREATEFROMDAT2 how can we add configuration data structure

Former Member
0 Likes
415

Hi All,

I am trying to create a salesorder with using bapi BAPI_SALESORDER_CREATEFROMDAT2 every thing is processing sucessfully but if i add these structures ( BAPICUCFG,BAPICUINS, and BAPICUPRT, BAPICUVAL ) for order creation i am not able to create the order, Please provide me some information or documentation about this issue.**

Regards,

Kalyan Chakravarthy K

2 REPLIES 2
Read only

Former Member
0 Likes
342

Hello,

Try this Code..

  • CU: Configuration Data

CLEAR: t2bapicucfg.

MOVE cfg1_posnr TO t2bapicucfg-posex.

MOVE cfg1_posnr TO t2bapicucfg-config_id.

MOVE '00000001' TO t2bapicucfg-root_id.

MOVE sy-langu TO t2bapicucfg-kblanguage.

APPEND t2bapicucfg.

  • Instances of several configurations

CLEAR: t2bapicuins.

MOVE cfg1_posnr TO t2bapicuins-config_id.

MOVE '00000001' TO t2bapicuins-inst_id.

MOVE 'MARA' TO t2bapicuins-obj_type.

MOVE klah_scat-class TO t2bapicuins-obj_key.

MOVE klah_scat-klart TO t2bapicuins-class_type.

APPEND t2bapicuins.

  • CU: Reference Order Item / Instance in Configuration

CLEAR: t2bapicuref.

MOVE cfg1_posnr TO t2bapicuref-posex.

MOVE cfg1_posnr TO t2bapicuref-config_id.

MOVE '00000001' TO t2bapicuref-inst_id.

APPEND t2bapicuref.

  • Default Values for Class

LOOP AT t2cval.

CLEAR: t2bapicuval.

MOVE cfg1_posnr TO t2bapicuval-config_id.

MOVE '00000001' TO t2bapicuval-inst_id.

MOVE t2cval-atnam TO t2bapicuval-charc.

MOVE t2cval-atwrt TO t2bapicuval-value.

APPEND t2bapicuval.

ENDLOOP.

Regards,

Krishna.

Read only

robert_altenstraer
Active Participant
0 Likes
342

hello

Information see note: 549563

bestreg Robert