2007 Jan 18 12:38 PM
Hi All,
I need experts help to resolve one high ticket.
During the change of Salesorder , I am deleting the partner from XVBPA internal table if there is no plant in Salesorder line item.
Like below.
IF NOT xvbap-werks IS INITIAL.
Want update the VBPA table.
ELSE."no plant
DELETE xvbpa WHERE parvw = 'ZP' .
xvbpa-updkz = 'D'.
MODIFY xvbpa INDEX sy-tabix.
ENDIF.
Some how the above code is not updating the DATABASE table vbpa. I have tried with yvbpa also but no luck.
Pls help me to resolve this ASAP.
rgds,
kali
Hi All,
I need experts help to resolve one high ticket.
During the change of Salesorder , I am deleting the partner from XVBPA internal table if there is no plant in Salesorder line item.
Like below.
IF NOT xvbap-werks IS INITIAL.
Want update the VBPA table.
ELSE."no plant
DELETE xvbpa WHERE parvw = 'ZP' .
xvbpa-updkz = 'D'.
MODIFY xvbpa INDEX sy-tabix.
ENDIF.
Some how the above code is not updating the DATABASE table vbpa. I have tried with yvbpa also but no luck.
Pls help me to resolve this ASAP.
rgds,
kali
2007 Jan 18 12:42 PM
Try putting this code in a program and submit the the program.
Also you have not specified how you are updating VBPA table.
regards,
Aravind
2007 Jan 18 1:08 PM
Is this the complete code or anything left and in which form routine are you writing this code .
can u please pass the exit name and the complete code.
is the code residing in a loop endloop or just the if condition .
first check the sales area .
and then loop at the particular item with no plant and check the condition and modify vbpa .
if vbak-vkorg eq 'XX' and vbak-spart = YY .
loop at xvbpa
where PARVW = 'ZP'
and POSNR = VBAP-POSNR.
IF xvbap-werks IS INITIAL. "item condition
DELETE xvbpa WHERE parvw = 'ZP' .
move 'D' to xvbpa-updkz.
MODIFY xvbpa .
ENDIF.
endloop.
Endif.regards,
vijay
2015 Feb 18 2:15 PM
i got a requirement to automate partner function in sales order create and change. kindly give me some idea to achieve this..
2015 Feb 18 2:17 PM
i got a requirement to automate partner function in sales order create and change. kindly give me some idea to achieve this..
2015 Feb 18 2:24 PM
Hi Pramod,
You don't need to delete the partner line.
Just Modify the line with xvbpa-updkz = 'D'.
System 'll not consider this partner automatically.
Regards
Akshat
2022 Oct 18 6:07 PM
Hi All,
I was able to figure it out by adding a record in YVBPA having UPKZ = 'D' and by deleting the XVBPA record.
read table xvbpa with key parvw = 'SP' assigning field-symbol(<lf_carr>).
if sy-subrc = 0.
if <lf_carr>-lifnr is not initial.
read table yvbpa assigning <lf_yvbpa> with key parvw = 'SP'.
if sy-subrc = 0.
<lf_yvbpa>-updkz = 'D'.
else.
append initial line to yvbpa assigning <lf_yvbpa>.
<lf_yvbpa> = <lf_carr>.
<lf_yvbpa>-updkz = 'D'.
endif.
delete xvbpa where parvw = 'SP'.
endif.
endif.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |