Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module for VBPA-READ

Former Member
0 Likes
2,345

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!!

7 REPLIES 7
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,402

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.

Read only

0 Likes
1,402

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

Read only

0 Likes
1,402

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.

Read only

0 Likes
1,402

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

Read only

0 Likes
1,402

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

Read only

0 Likes
1,402

Hi Markus,

You should inter the value of VBRP-POSPA in the position nr of the FM, not VBRP-POSNR.

Kind regards,

Daniel

Read only

Lakshmant1
Active Contributor
0 Likes
1,402

Hi Markus,

Check FM SD_VBPA_SELECT

Thanks

Lakshman