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.
Showing results for 
Search instead for 
Did you mean: 

problem in populating zfields in valuepart1 of lw_extensionin using BAPI

Former Member
0 Kudos

hi friends , i have a problem of populating zfields of PO in valuepart1 as the length of zfields required is more than 240(length of value part1) ,can i know how to populate zfields into valuepart2 using BAPI_PO_CREATE1


0 Kudos

Move your zfield values into EXTENSIONIN table parameter.

You will then use the following customer exits to populate your zfields from your EXTENSIONIN itab

EXIT_SAPL2012_001 (at start of BAPI)

EXIT_SAPL2012_003 (at end of BAPI)

The following customer exits (function modules) are available for the BAPI BAPI_PO_CHANGE:

EXIT_SAPL2012_002 (at start of BAPI)

EXIT_SAPL2012_004 (at end of BAPI)

There is good documentation on all of the above exits.

Former Member
0 Kudos

thank you for ur answer , i tried populating zfield of datatype DATS using Extensioninn, but i couldnt can u pl tell me how to solve this problem.

0 Kudos

Below is example code for populating your zfields into extensionin:

DATA: extensionin TYPE STANDARD TABLE OF bapiparex,
      wa_extensionin LIKE LINE OF extensionin.

DATA: zfield1     TYPE dats,
      zfield2(5)  TYPE c,
      zfield3(10) TYPE n.

zfield1 = sy-datum.
zfield2 = 'abcde'.
zfield3 = 1234567890.

wa_extensionin-valuepart1+0(8)   = zfield1.
wa_extensionin-valuepart1+8(5)   = zfield2.
wa_extensionin-valuepart1+13(10) = zfield3.

APPEND wa_extensionin TO extensionin.