Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9069

Re: BAPI_PR_CREAT- Adding new components

$
0
0

Hi,

 

i can able to achieve this by calling FM ' ME_COMPONENTS_UPDATE'  twice.

 

one time for deleting the existing components of PR items and one more time new values

 

    lv_rsnum = ls_eban-rsnum"use this for comp insert

     ls_vmdpm_i-ebeln  ls_vmdpm_d-ebeln  =   ls_eban-banfn.

     ls_vmdpm_i-ebelp  ls_vmdpm_d-ebelp  = ls_eban-bnfpo.

     ls_vmdpm_i-rsnum  ls_vmdpm_d-rsnum  = ls_eban-rsnum.

     ls_vmdpm_i-sobkz  ls_vmdpm_d-sobkz  = 'Q'..

     ls_vmdpm_i-knttp   ls_vmdpm_d-knttp  = 'Q'.

     ls_vmdpm_d-updkz   = 'D'.

     append ls_vmdpm_d to lt_vmdpm_d.

     clear ls_vmdpm_d.

 

call function 'ME_COMPONENTS_UPDATE' in update task

     exporting

       i_number = gv_preqno

     tables

       t_vmdpm  = lt_vmdpm_d.

   commit work .

 

 

* Insert new components

     ls_vmdpm_i-updkz = 'I'.

     append ls_vmdpm_i to lt_vmdpm_i.

     clear ls_vmdpm_i.


call function 'ME_COMPONENTS_UPDATE' in update task

       exporting

         i_number = gv_preqno

       tables

         t_vmdpm  = lt_vmdpm_i

         t_xmdpm  = lt_xmdpm

         t_xmdsb  = lt_xmdsb

         t_mdlb   = lt_mdlb.


Viewing all articles
Browse latest Browse all 9069

Trending Articles