05-21-2008 9:30 AM
Hi,
I'm looking for a function module/BAPI that gives me the ship-to-party of a document, that means I wanna import the following data:
- VBELN
- POSNR
- Partner-Role (SH)
And it should give out the right KUNNR.
Is there such a function module?
Thanks!!
05-21-2008 9:34 AM
Hi Markus,
Use FM SD_VBPA_SINGLE_READ
U will get customer number in exporting parameter VBPA (kunnr field)
U can try these FMs also.
SD_VBPA_ARRAY_READ_VBELN
SD_VBPA_READ_WITH_VBELN
WB2_VBPA_ARRAY_READ
thanks,
Vinod.
05-21-2008 9:39 AM
The problem is only that the function modules brings out the data directly from table. But I have the problem that:
pos 10 has a SH --> Entry in table VBPA with posnr 10 and the right KUNNR
pos 11 has also a SH (same as pos 10) --> NO entry in table VBPA also not with posnr 0
but why??
Transaction VF03 really shows that every position has a SH, but there is only one entry in table VBPA for SH and thats pos 10.
because of that I didn't want to read the table directly and using a function module that implements the logic to bring me the same data as VF03 does.
Kind regards
Markus
05-21-2008 9:45 AM
Hi Markus,
In ur select/FM pass vbeln with leading zeros, posnr as 6 zeros '000000' and partner function as 'WE' but not SH.
There is conversion routine for this field. This may be the problem. But if u use FM it will take care of these things.
Check these n revert back.
Thanks,
Vinod.
05-21-2008 9:51 AM
Test for function group V45I
Function module SD_VBPA_SINGLE_READ
Upper/lower case
Runtime: 1.096 Microseconds
Exception RECORD_NOT_FOUND
Message ID: WVA Message number: 033
Message :
There is no partner data with keys 146880 000000 SH
-
That is the output after the execution of the FM (I enterd the "WE"-role and it is transformed to SH)...
That are the entries in database:
VBELN POSNR PARVW KUNNR
0000146880 000000 AG 0000102392
0000146880 000000 RE 0000102220
0000146880 000000 RG 0000102228
0000146880 000000 ZP 0000190027
0000146880 000010 WE 0000104541
I really don't know how to get the value that is shown in Transaction VF03.
Regards,
Markus
05-21-2008 10:07 AM
Hi markus,
Becuase of the conversion routine present at domain level for PARVW, the value is changing from WE to SH.
Use the FM's CONVERSION_EXIT_PARVW_INPUT & CONVERSION_EXIT_PARVW_OUTPUT for converting the values.
Hope this helps
Thanks
Lakshman
01-06-2011 1:20 PM
Hi Markus,
You should inter the value of VBRP-POSPA in the position nr of the FM, not VBRP-POSNR.
Kind regards,
Daniel
05-21-2008 9:38 AM