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

How to get data from LAGP using VBAP ?

former_member594288
Participant
0 Likes
2,586

Hi,

How to get data from LAGP using VBAP ?

Hi,

How to get data from LAGP using VBAP ?

11 REPLIES 11
Read only

RobertVit
Active Contributor
0 Likes
2,430

with functionmodule L_LQUA_COLLECT_FOR_BAPI you will get lqua table with key fields for lagp

Kind regards
Robert
Read only

0 Likes
2,430

How can i get LAGP data using this? there is no VBAK link.

Read only

Nawanandana
Active Contributor
0 Likes
2,430

Hi,

you have to link using table LTAK.

LAGP-LGNUM = LTAK -LGNUM

LTAK -VBELN = VBAP-VBELN

Read only

0 Likes
2,430

In LTAK, vbeln is empty.

Read only

0 Likes
2,430

You need to check LTAK -BETYP = 'L'. others will be different or let us know what is the senario your looking at.

Read only

RobertVit
Active Contributor
0 Likes
2,430

Hi,

cause of your question i thought you are using custom stock.....

Kind regards
Robert
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,430

In which case do you want to identify Storage bins from a sales document item number, did you already look at tables such as LIPS, LQUA, or LTAP?

Read only

0 Likes
2,430

Can you tell me the link b/w the tables using VBAP.

Read only

0 Likes
2,430

Could you define your case or look for the key/criteria fields in the table with SE11.

Read only

0 Likes
2,430

Hi Raymond,

I followed the below logic. Is it fine to link like below?

FROM vbap AS vp

INNER JOIN mska AS ms

ON vp~vbeln = ms~vbeln

AND vp~posnr = ms~posnr

AND vp~matnr = ms~matnr

AND vp~werks = ms~werks

AND vp~sobkz = ms~sobkz

INNER JOIN lqua AS lq ON

ms~matnr = lq~matnr

AND ms~werks = lq~werks

AND ms~charg = lq~charg

AND ms~sobkz = lq~sobkz

INNER JOIN lagp AS lg

ON lq~lgnum = lg~lgnum

AND lq~lgtyp = lg~lgtyp

AND lq~lgpla = lg~lgpla

Read only

0 Likes
2,430

Can be correct (depends on your actual requirement: delivered part, customer stock items, transfer order, etc.) also try to minimize redundant join criteria (only when actually required, test/check as usual)