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

Transaction CS12 problem

Former Member
0 Likes
547

Hi All,

I am trying to populate the ALV Grid shown in the CS12 transaction in a program without calling the transaction ,I have written the code to select the data from the tables , but I am not sure whether it will give all the correct data or not, if some field is missing please suggest from which tables i have to take the data.

SELECT matnr

werks

stlal

stlnr

FROM mast

INTO CORRESPONDING FIELDS OF

TABLE it_mast

WHERE matnr IN p_matnr

AND werks IN p_werks

AND stlal IN p_stlal.

*selecting material description from makt

IF it_mast[] IS NOT INITIAL.

SELECT maktx

FROM makt

INTO CORRESPONDING FIELDS OF

TABLE it_makt FOR ALL ENTRIES IN it_mast

WHERE matnr = it_mast-matnr.

ENDIF.

*

*selecting information about BOM Item from table STPO

IF it_mast[] IS NOT INITIAL.

SELECT menge

postp

meins

aennr

pswrk

stlnr

stlkn

FROM stpo

INTO CORRESPONDING FIELDS OF

TABLE it_stpo FOR ALL ENTRIES IN it_mast WHERE

stlnr = it_mast-stlnr.

ENDIF.

1 REPLY 1
Read only

Former Member
0 Likes
389

please try to use

CS_BOM_EXPL_MAT_V2 fm it can give you lot of things by passing the header material you can get all the information about BOM.

regards

shiba dutta