Hi SAP Expert,,
I have change user exit PCSD0005 (EXIT_SAPLCSDI_006) to restrict same component not allow at time of BOM creation ( T-Code CS01).
When user create BOM Through Transaction the no issue in this User exit.
But when User Run BDC to BOM Creation then it gives message error which is written in my user exit " Same Component Not Allowed "
Note: First BOM created Successfully but problem in next BOM creation which content same component ( Please see give below Excel Data )
Coding***
IF SY-TCODE EQ 'CS01' OR SY-TCODE EQ 'CS02'.
DATA : BEGIN OF TAB,
IDNRK TYPE STPOB-IDNRK,
END OF TAB.
DATA : T_TAB LIKE STANDARD TABLE OF TAB WITH HEADER LINE.
DATA : WA LIKE LINE OF T_TAB.
IMPORT T_TAB FROM MEMORY ID 'ZPP'.
MOVE: COMPONENT TO WA-IDNRK.
IF T_TAB[] IS NOT INITIAL.
LOOP AT T_TAB WHERE IDNRK EQ WA-IDNRK.
MESSAGE 'SAME COMPONENT NOT ALLOWED ' TYPE 'E'.
ENDLOOP.
APPEND WA TO T_TAB. " SORTED BY IDNRK.
EXPORT T_TAB TO MEMORY ID 'ZPP'.
********************
** The T_TAB is not clear at the time of SAVE Button of first BOM which is present in my Excel file.
Excle Formate File Data for BDC :
Material Code
Plant
Bom Usage
Base Quantity
Raw Material
Raw material Qty
11000005041
1g10
1
1
10000019496
11000005041
1g10
1
1
10000013297
11000005041
1g10
1
1
10000013298
11000005041
1g10
1
1
10000013299
11000005041
1g10
1
1
10000013304
11000005041
1g10
1
1
10000013308
11000005042
1g10
1
1
10000019496
1,397.70
11000005042
1g10
1
1
10000013297
79
11000005042
1g10
1
1
10000013298
11000005042
1g10
1
1
10000013299
11000005042
1g10
1
1
10000013304
11000005042
1g10
1
1
10000013308
11000005042
1g10
1
1
10000013322
Is it possible with this user exit or there is another way.
please guide me..