Application Development 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: 

user exit for BOM

Former Member
0 Kudos
495

hello,....

problem: using BOM in VA01...for free goods material.....

I am working on user exit for BOM...I need to write a code in FV45SFCO_CONFIGURATION_SET_STM under this we have call customer funcion '003'

if we click on this we will enter in include ZXVVAU12.....In this including I need to write the code(user exit) by using XSTB table and the values in that table I have to populate in XVBAP.......for the BOM Explosion........when we use VA01......

so please tell me how can i write the code in that exit ...by getting the data from XSTB to XVBAP........by using the field STLAL (It is Alternative BOM in BOM Screen)...for example if I select '05' (stlal) BOM type.....the values in XSTB populate in XVBAP...

anyone help me on this........

Otherwise give me any other sample code for the userexit BOM so that I will learn...a lot from that....

Thanks in advance,

Madhu

2 REPLIES 2

ferry_lianto
Active Contributor
0 Kudos
132

Hi Madhu,

You can try something like this to read XSTB in user exits EXIT_SAPFV45S_003.


DATA: XT_XSTB LIKE STANDARD TABLE OF SDSTPOX WITH HEADER LINE.
 
FIELD-SYMBOLS: <XSTB> TYPE TABLE.
 
DATA: FIELD_NAME(30) VALUE '(SAPFV45S)XSTB[]'.
 
ASSIGN (FIELD_NAME) TO <XSTB>.
XT_XSTB[] = <XSTB>.
 
READ TABLE XT_XSTB WITH KEY STLAL = '05'.

IF SY-SUBRC = 0.
....                      <--- your logic to move to VBAP
ENDIF.

Regards,

Ferry Lianto

0 Kudos
132

Hello,

The logic should be like this........

when ever the combination of materials....matnr1 and matnr2,....should not exceed quantity 6.....the combination must be like 6-0, 5-1, 4-2, 3-3, 2-4. material matnr1 minimum qty is 2.....so anyone give me the logic....sample code..

madhu..