on 07-03-2007 6:07 PM
To output a list not only show the Ship-to Party of the SO header, but also show the Ship-to party for every item of the SO.
Thanks!!!
How many tables coule get this done??
Thanks.
Dear Hoo Laa,
Table joint will be as follows:
(Table-Field) VBAK-VBELN = VBAP-VBELN
VBAK-VBELN = VBPA-VBELN & VBAP-POSNR-VBPA-POSNR
Regards,
Rajesh Banka
<b>Reward suitable points.
How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I had joined 3 tables. VBAK-VBAP-VBPA
(Table-Field) VBAK-VBELN = VBAP-VBELN
VBAK-VBELN = VBPA-VBELN & VBAP-POSNR-VBPA-POSNR
But I found it was strange that i could not get any data when i tried to input those into the selection screen:
-
Parner Function: WE(Or SH)
Date on: XX-XX-XXXX to XX-XX-XXXX
Sales order type: ZZZ
-
While when i set the Partner Function to Blank:
-
Parner Function: ___
Date on: XX-XX-XXXX to XX-XX-XXXX
Sales order type: ZZZ
-
The output list could be generated, but the value of the Parner Function in the list is SR (Sales Reps), and the corresponding customer name is the Sales Rep's name not the Ship-to Party.
It is really strange!!!
Anyone know why above situations would happen???
Thanks in advance!!!
By the way, if i dont want to get the Ship-to party for every item, i just want to get the ship-to party in SO header level. Then which table for me to join to get it??
Thanks!!!
I had joined 3 tables. VBAK-VBAP-VBPA
(Table-Field) VBAK-VBELN = VBAP-VBELN
VBAK-VBELN = VBPA-VBELN & VBAP-POSNR-VBPA-POSNR -> here do not compare with posnr with vbpa-posnr ( if you compare you get sy-subrc eq 4),vbpa-posnr contains 000000( so please remove posnr condition in select query )
always compare parvw = 'WE' then only you get results
Thanks
Seshu
Hi Hoo Laa,
SP is English Term,but while saving to the database we need to use AG( German Word),SAP Internally validate on AG.
same thing for Ship to paty SP ( English),while saving to database ,we need to use WE(German Word).
Sold to party SP(english) AG (German)
Ship-to-party SH(english) WE(german)
Bill to party BP RE
Payer PY RG
Thanks
Seshu
Dear Hoo Laa,
VBAK Sales Document: Header Data
VBAP Sales Document: Item Data
VBEP Sales Document: Schedule Line Data
VTPA Shipping Partner
VFPA Partner for Shipment Costs
VBPA Sales Document: Partner
Regards,
Naveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
then use
VBAK,
VBAP
VBPA Table ,Join all above tables and you get output for every line item
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hoo Laa,
Use Partner function WE as Ship to party ( While selecting the data use WE,do not use SH)
Check the below program :
REPORT Zxyz.
tables : vbak,
vbap,
vbpa.
data : begin of i_final occurs 0,
vbeln like vbak-vbeln,
vkorg like vbak-vkorg,
kunnr like vbak-kunnr," Sold to party
posnr like vbap-posnr,
matnr like vbap-matnr,
kwmeng like vbap-kwmeng,
netpr like vbap-netpr,
end of i_final.
data : begin of i_output occurs 0,
vbeln like vbak-vbeln,
vkorg like vbak-vkorg,
kunnr like vbpa-kunnr," Sold to party
posnr like vbap-posnr,
matnr like vbap-matnr,
kwmeng like vbap-kwmeng,
netpr like vbap-netpr,
end of i_output.
start-of-selection.
select avbeln avkorg
bposnr bmatnr bkwmeng bnetpr
into table i_final up to 100 rows
from vbak as a inner join vbap as b on bvbeln = avbeln.
loop at i_final.
select single * from vbpa into vbpa
where vbeln = i_final-vbeln
and parvw = 'WE'. -> Partner function
if sy-subrc eq 0.
i_output-kunnr = vbpa-kunnr.
endif.
i_output-vbeln = i_final-vbeln.
i_output-vkorg = i_final-vkorg.
i_output-posnr = i_final-posnr.
i_output-matnr = i_final-matnr.
i_output-kwmeng = i_final-kwmeng.
i_output-netpr = i_final-netpr.
append i_output.
endloop.
end-of-selection.
loop at i_output.
write:/ i_output-vbeln,i_output-vkorg,i_output-kunnr,i_output-posnr,
i_output-matnr,i_output-kwmeng,i_output-netpr.
endloop.
Thanks
Seshu
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.