Application Development 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: 

Adding custom fields in BAPI structure for SO creation.

0 Kudos

Hi All,

I have a requirement to overwrite 2 fields: I] KVGR1 II] ZZ_PROJECTID both these fields belongs to VBAK.

I have to fetch these fields from w_ref_doc. So using Select query I store the data into an internal table as follows:

SELECT KVGR1 ZZ_PROJECTID

FROM VBAK

INTO TABLE LT_VBAK

WHERE VBELN = W_REF_DOC.

Now, to assign these values into the BAPI Structure For SO Creation. FM used: BAPI_SALESORDER_CREATEFROMDAT2

FOR KVGR1, there is a field in BAPI and I have assign the value as follows:

(ls_order_header_in LIKE bapisdhdl)

ls_order_header_in-CUST_GRP1 = lt_vbak-KVGR1.

But for ZZ_PROJECTID, there is no similar field. Can anybody please suggest me the ways to pass the ZZ_PROJECTID value to BAPI.

Regards,

Ankita

1 REPLY 1