Skip to Content
0
Jan 19, 2016 at 10:24 AM

Need to Update Purchase order Line level.

276 Views

Hi,

I have one requirement , I have custom tab in Me23n. So, i need to update these fields by using the code.

So, i checked in forum, I never did it before(Updating custom Fields). I got some information that.So, I need to fill the bapi structures

BAPI_TE_MEPOITEM,

BAPI_TE_MEPOITEMX.

Bapi Strucutre BAPI_TE_MEPOITEM Is all ready having Include it is having custom fields.

But BAPI_TE_MEPOITEMX Structure is not available . Exactly like BAPI_TE_MEPOITEM I append the include of BAPI_TE_MEPOITEMX

Now Both Structures are same .

Now i am filling the fields and declaration will be like below.

DATA: WA_EXTENSIONIN TYPE BAPIPAREX,

WA_BAPIPAREX TYPE BAPIPAREX,

WA_BAPI_TE_MEPOITEM TYPE BAPI_TE_MEPOITEM,

WA_BAPI_TE_MEPOITEMX TYPE BAPI_TE_MEPOITEMX.

WA_BAPI_TE_MEPOITEM-PO_ITEM = ''.

WA_BAPI_TE_MEPOITEM-ZZPROJECTNUMBER = ''.

WA_BAPI_TE_MEPOITEM-ZZPROJECTNAME = ''.

WA_BAPI_TE_MEPOITEM-ZZMENGE = ''.

WA_BAPI_TE_MEPOITEM-ZZMEINS = ''.

WA_BAPI_TE_MEPOITEM-ZZMCTXT = ''.

WA_BAPI_TE_MEPOITEM-ZZKOSTL = ''.

WA_BAPI_TE_MEPOITEMX-PO_ITEM = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZPROJECTNUMBER = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZPROJECTNAME = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZMENGE = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZMEINS = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZMCTXT = 'X'.

WA_BAPI_TE_MEPOITEMX-ZZKOSTL = 'X'.


WA_EXTENSIONIN-STRUCTURE = 'BAPI_TE_MEREQITEM'.

WA_EXTENSIONIN+30 = WA_BAPI_TE_MEPOITEM.

APPEND WA_EXTENSIONIN TO IT_EXTENSIONIN.

WA_EXTENSIONIN-STRUCTURE = 'BAPI_TE_MEREQITEMX'.

WA_EXTENSIONIN+30 = WA_BAPI_TE_MEPOITEMX.

APPEND WA_EXTENSIONIN TO IT_EXTENSIONIN.


But i need to move Bapi Po item details to the Bapi_Extension. But i am not able to move the data .Please have a look on below attached image.

Can any body tell me how could i move the data. Need valuable suggestions.






Attachments

bapi_extension.png (98.3 kB)