Displaying alternative BOM's in a structural display
Hi,
We are on R/3 4.7. I have created two material alternative BOM's and am trying to find a way to display these in the structural display (IH01). When I create a equipment BOM and use alternate BOM #1 for a material it displays fine. I have not been able to find a way to display alternate BOM #2 for the same material putting it on a different equipment BOM. When I add the material to the equipment BOM and I double click into the 'assembly' section it shows the two alternative BOM's but I don't see a way to select which one I want. It always defaults to alternative #1.
Any help with this would be appreciated.
JRW
Hi,
We are on R/3 4.7. I have created two material alternative BOM's and am trying to find a way to display these in the structural display (IH01). When I create a equipment BOM and use alternate BOM #1 for a material it displays fine. I have not been able to find a way to display alternate BOM #2 for the same material putting it on a different equipment BOM. When I add the material to the equipment BOM and I double click into the 'assembly' section it shows the two alternative BOM's but I don't see a way to select which one I want. It always defaults to alternative #1.
Any help with this would be appreciated.
JRW
Similar Messages
-
To display flatfile rec's under 1 Alternative BOM using BDc recording.
Hi,
I m trying to display flat file entire(i.e.. 4 rec's i m using) records vertically under one (Alternative BOM) for CS01-BOM using BDC recording method.
Now i m tried with the following code,i m getting as one (Alternative BOM) for one ff record,by replacing one by one.
But i want as vertically under one (Alternative BOM).
Can anyone help me to overcome this.
report ZBOM
no standard page heading line-size 255.
*include bdcrecx1.
DATA: BEGIN OF bdc OCCURS 0,
matnr(18),
werks(4),
stlan(1),
END OF BDC.
DATA: BEGIN OF BDC1 OCCURS 0,
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
posnr(4),
END OF bdc1.
DATA: BEGIN OF BDCDATA OCCURS 0,
matnr(18),
werks(4),
stlan(1),
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
posnr(4),
END OF BDCDATA.
data ibdcdata type standard table of bdcdata WITH header line.
*start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ','
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = BDCDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
loop at bdcdata.
perform bdc_dynpro using 'SAPLCSDI' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RC29N-STLAN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29N-MATNR'
'SOFTDRINKS'.
perform bdc_field using 'RC29N-WERKS'
'WIND'.
perform bdc_field using 'RC29N-STLAN'
'1'.
perform bdc_field using 'RC29N-DATUV'
'16.09.2008'.
perform bdc_dynpro using 'SAPLCSDI' '0110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29K-BMENG'
'1'.
perform bdc_field using 'RC29K-STLST'
'1'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-EXSTL'.
perform bdc_dynpro using 'SAPLCSDI' '0111'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-LABOR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSTP(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FCBU'.
perform bdc_field using 'RC29P-IDNRK(001)'
BDCDATA-IDNRK.
perform bdc_field using 'RC29P-MENGE(001)'
BDCDATA-MENGE.
perform bdc_field using 'RC29P-MEINS(001)'
BDCDATA-MEINS.
perform bdc_field using 'RC29P-POSTP(001)'
BDCDATA-POSTP.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
BDCDATA-POSNR. "'0010'.
perform bdc_field using 'RC29P-IDNRK'
BDCDATA-IDNRK. "'15'.
perform bdc_field using 'RC29P-MENGE'
BDCDATA-MENGE. "'1'.
perform bdc_field using 'RC29P-MEINS'
BDCDATA-MEINS. "'ml'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
*perform bdc_transaction using 'CS01'.
*perform close_group.
CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
REFRESH IBDCDATA.
clear ibdcdata.
endloop.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR iBDCDATA.
iBDCDATA-PROGRAM = PROGRAM.
iBDCDATA-DYNPRO = DYNPRO.
iBDCDATA-DYNBEGIN = 'X'.
APPEND ibDCDATA .
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL NODATA.
CLEAR iBDCDATA.
iBDCDATA-FNAM = FNAM.
iBDCDATA-FVAL = FVAL.
APPEND iBDCDATA .
ENDIF.
ENDFORM.Hi Dilip,
Please change your code.
I request you to please go through BDC tutorials before even starting to write the program.
There are many online tutorials which can help you with.
Also, search in SDN.. there you will get more than thousand results.. with the search term BDC.
Take this suggestion seriously before nayone reports the moderators that u have been posting this thread daily without taking into consideration the previous replies.
Regards,
Vishwa. -
Creating BOM using BDC :How to display no of records from flat file under
Hi,
How to display no of records from flat file under one (Alternative BOM) vertically.
When i execute, the records are replacing one by one.
Here my coding:
report ZBOM1
no standard page heading line-size 255.
*include bdcrecx1.
DATA: BEGIN OF bdc OCCURS 0,
matnr(18),
werks(4),
stlan(1),
END OF BDC.
DATA: BEGIN OF BDC1 OCCURS 0,
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
END OF bdc1.
DATA: BEGIN OF BDCDATA OCCURS 0,
matnr(18),
werks(4),
stlan(1),
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
posnr(4),
END OF BDCDATA.
data: ibdcdata type standard table of bdcdata WITH HEADER LINE.
*start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ','
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = BDCDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
loop at bdcdata.
perform bdc_dynpro using 'SAPLCSDI' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RC29N-STLAN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29N-MATNR'
'SOFTDRINKS'.
perform bdc_field using 'RC29N-WERKS'
'WIND'.
perform bdc_field using 'RC29N-STLAN'
'1'.
perform bdc_field using 'RC29N-DATUV'
'16.09.2008'.
perform bdc_dynpro using 'SAPLCSDI' '0110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29K-BMENG'
'1'.
perform bdc_field using 'RC29K-STLST'
'1'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-EXSTL'.
perform bdc_dynpro using 'SAPLCSDI' '0111'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-LABOR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSTP(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FCBU'.
perform bdc_field using 'RC29P-IDNRK(01)'
BDCDATA-IDNRK.
perform bdc_field using 'RC29P-MENGE(01)'
BDCDATA-MENGE.
perform bdc_field using 'RC29P-MEINS(01)'
BDCDATA-MEINS.
perform bdc_field using 'RC29P-POSTP(01)'
BDCDATA-POSTP.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
BDCDATA-POSNR. "'0010'.
perform bdc_field using 'RC29P-IDNRK'
BDCDATA-IDNRK. "'15'.
perform bdc_field using 'RC29P-MENGE'
BDCDATA-MENGE. "'1'.
perform bdc_field using 'RC29P-MEINS'
BDCDATA-MEINS. "'ml'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
*perform bdc_transaction using 'CS01'.
*perform close_group.
CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
REFRESH IBDCDATA.
endloop.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR iBDCDATA.
iBDCDATA-PROGRAM = PROGRAM.
iBDCDATA-DYNPRO = DYNPRO.
iBDCDATA-DYNBEGIN = 'X'.
APPEND ibDCDATA .
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR iBDCDATA.
iBDCDATA-FNAM = FNAM.
iBDCDATA-FVAL = FVAL.
APPEND iBDCDATA .
ENDIF.
ENDFORM.Hi,
the BDCDATA structure must be fnam, fval,dynbegin,dynpro,program.
You have to declare like this and pass this in your CALL TRANSACTION statement.
Please give some other table name for BDCDATA you declared for and also for IBDCDATA. -
Display Alternative Account in Additional Data screen of FB03
Dear SAP experts,
Transaction code FB03's screen does have an alternative account column. But I want to display
Alternative account when I click on each account (in line item of FB03 screen) or display
alternative account in Additional Data screen of FB03. I don't know how to do it.
Does anyone here know about configuring this, please help me.
Thank you so much.
Maxielight.Hi,
To display the "Alternative Account Number" field in report of the new General Ledger, please proceed as follows:
1) Implement Note 895609 and 939649.
2) To display "Alternative Account Number" in the line layout variant, proceed as follows:
- Call transaction O7R3 and add BSEG-LOKKT as special field.
- Then change the line layout variant. The system now displays the "Alternative Account Number" field.
3) In the line item display in the classic General Ledger (transaction FBL3N), you could enhance the custom selections in transaction SE36 as described in Note 310886. However, in the new General Ledger, the custom selection in transaction FAGLL03 has different sub-areas. Each of these areas corresponds to a structure:
G/L account master record SKA1_FS
G/L account company code SKB1_FS
G/L account line item BSIS_FS
Since the "Alternative Account Number" is not included in the structure SKB1_FS in the standard delivery, please implement the enhancement as described in Note 945932. To include more fields in the custom selections of transaction FAGLL03, you can enhance the structures using an APPEND.
Regards,
Gaurav -
Hierarchial display of BOM in ALV
Hai Experts,
I have a small requirement to display the bom in an hierarchial tree in alv.
The tree shud be as follows:
>material
>material1
>material2
.material3
. material4
>material5
>material6
.matreil17
etc...
the tree structure in the alv shud be as shown above.
I have a structure with
MATNR
MAKTX
AMOUNT
UNIT
PAR_RECNO
SON_RECNO
IS_LEAF
LEVEL.
i have a method which returns above structure .Can anyone help me how to get the hierarchial structure?
Code will be helpful
Thanks&Regards,
MadhuHi Madhu,
have a look to this..
http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=7C3545415EA6F523E10000000A155106&TMP_IWB_TASK=PREVIEW&RELEASE=672&LANGUAGE=EN&_SEQNUM=143&_LOIO=3E904B2624534E0DB707C7314A5E1E9D&_CLASS=IWB_EXTHLP
For WD ALV you need for each level of your Tree a column.
=>The WD ALV Tree is more like a sorted table, where each tree column is part of the aggregation
regards, Martin -
Poor Performance : Structure Display - IH01 / Structure List - IE02/IE03
Hi All,
We are using version ECC 6.0
When we run transaction IH01 (Structural Display), the system almost gets hanged (i.e: NO output at all for hours together). We are not able to view the structural display even if we maintain the "Display levels below" as 5. The hourglass runs for ever without displaying any output which prompts us to abort the transaction in between.
Moreover we are facing similar problem in Transaction IE02 & IE03 (Change & Display Equipment) when we click the structe list for an equipment. Here also the system takes a long time to display the structure list of that equipment. However after some times the system displays the output.
Kindly post your valuable suggestions on resolving the problem.
Thanks and with Best Regards.
Kannan JI think displaying 5 levels below definitely affects your performance. Try to run it with 1 level below and see if it makes any difference.
There is also a config setting that affects the performance of IH01 which is, Master Data>Technical Objects>General Data-->Define Selection Procedure for Structural Display and BOMs.
Try to set this setting see if it helps.
Hope it helps,
PJ -
Cannot get iPad 2 charged beyond 1%. All charging ports tried: AC adapter(s), USB 2 port on MacBook Pro. ITunes shows iPad only for a few seconds. iPad displays alternately: Apple logo, battery w/slim red band, then battery w/1% charged information. How can I get it to charge beyond 1% so I can proceed to troubleshoot?
I have had your exact problem with my old 3GS, now I cannot even get it to turn on, I still see that it is supposed to be charging though, but it never charges any so it seems.
I replaced the Lower Dock Connector Assembly back when it still charged while hooked to my PC, and it found it made no real difference.
http://www.amazon.com/gp/product/B003Y5YXLK/ref=oh_details_o05_s00_i00?ie=UTF8&p sc=1
At this point I am not sure if I should replace the battery and hope for the best, or just junk the phone, I cannot really sell it if I cannot reset it... -
Search Help with Structure Display
Hi,
I want to create a search help which should display my output in the structure format base on the different levels.
I have already written a test program which display all the values in proper structure format. But I wanna do the same in the search help. It has to display the output in the structure format.
Please guide me how to achieve this.
Thanks,
Karthikhello,
you could write additional report based on ALV tree. So you would have the stucture which you want to have and on value request call your custom program. i doubt that there is FM or class which could generate search help tree. So basically you have to write your own logic. Or you could use GuiXt tool. Example and tutorial.
http://www.synactive.com/tutor_e/lessonco00.html
br,
dez_ -
For output display report is final_internal table or structure in wd ABAP?
Hi all,
for output display report is final_internal table or structure in wd ABAP?
in wd java output display report -.> CALLING rfc and that RFC OUTPUT table
finally in internal table is assigned to STRUCTURE .Same procdure?
Thanks,
RAMADear Madhu,
thanks for guidence!
its showing popup tht this BADI ( ME_CHANGE_OUTTAB_CUS ) is only use for "SAP Internal use".
Regards,
Praphull -
To display multiple BOMS by selection
I'm trying to avoid havig to create a report to collectively display multiple BOMS by selection (eg MRP controller, group of header materials etc) to satisfy the following:
- collective display
- multi-level display (indented)
- factor scrap, giving component qtys as per base qty of BOM header
Trans CS11 provides this info, only on an individual BOM basis.Hi,
Can explain your query a bit more in brief?
Thanks
Kathir~ -
Display multilevel BOM for multiple materials
Hi,
I am to trying to display multilevel BOM explosion for multiple BOMs valid to custom date. Then I would like to export this list of all components to Excel.
Best solution would be if to create QuickView to do this.
So far I have been able to Join tables MAST - STPO, this shows me only one level of BOM (sort of like CS03 transaction) not a multilevel view (CS12). Is it possible to modify this to display multilevel view?
Thank you,
TomasDear Thomas,
in order to have a multilevel Bom explosion you must use only fm : CS_BOM_EXPL_MAT_V2 because you won't succeed to have a multiplevel with a simple query.
I advise you set MEHRS = X for active multilevel logic.
Let me know if i have been useful for you
Daniele -
Regading Object History and Structure Display
Hi all,
I need to add the standard functionality for the Object History and structure Display in my screen where i have FUNCTIONAL LOCATION as the input.
So i need the standard functioanlity for these field in my screen.
Please tell me how it can be achieved.
Useful answers will be rewarded.
Thanks & Regards,
ArunTHANKS
-
BOM Explosion (CS_BOM_EXPL_MAT_V2) - inactive alternative BOM
Hi,
I need to display the alternative BOM entered in the selection screen even if the entered alternative is inactive. i.e. status is inactive. i have used FM - CS_BOM_EXPL_MAT_V2.
Kindly advise.
Regards.Using Function module CS_BOM_EXPL_MAT_V2
As already has been said, the RNDKZ field is used for rounding. If you fill with '1', it will never round.
Example (the problem I had):
Material A consist of et al. 0.008 piece Material AA.
Material AA consist of 1.0 pice Material AAA,
of 7.0 piece Material AAB,
of 6.0 piece Material AAC,
of 12.0 piece Material AAD.
CASE 1: You fill RNDKZ field with '1':
You get the correct result which is:
You need for producing 1 piece of Material A
0.008 piece Material AA,
0.008 * 1 = 0.008 piece of Material AAA,
0.008 * 7.0 = 0,056 piece of Material AAB,
0.008 * 6.0 = 0,048 piece of Material AAC.
0.008 * 12.0 = 0,096 piece of Material AAD.
CASE 2: You let RNDKZ field blank.
In your user profile for BOM field "Round of" is set to blank (table field TCSPR-AMEKZ, TA S_ALR_87004496).
You get following result (which is wrong)
You need for producing 1 piece of Material A
1 piece Material AA,
1.0 *1.0 = 1.0 piece of Material AAA,
1.0 * 7.0 = 7.0 piece of Material AAB,
1.0 * 6.0 = 6.0 piece of Material AAC.
1.0 * 12.0 = 12.0 piece of Material AAD.
The number of decimals is seen depends as well from how many decimals is set for unit of measurement. In this case the number of decimals for "piece" was set to zero. (TA CUNI).
If you let the field RNDKZ field blank, the user profile field "Round of" (table field TCSPR-AMEKZ) is used. -
Alternative BOM in Production Order
Hi PP Experts,
I have a small issue which is like this:
I have two Alternative BOM for Material "A".
When I create production order it displays both Alt Bom for selection.
When I select the second Alt BOM, in production order it still reads the First Alt BOM.
Please advice.
Regards
MohanHi Mohan,
I suggest if you have two alternate BOM for a material, you can use the production versions and assign the same for the material in Material Master MRP4 view.
Create Production Versions 01 and 02 and assign the alt BOM 1 for the PV 01 and 02 alt bom for PV 02.
Goto SPRO : Production -> Shop Floor Control -> Define Order type dependent paramters ( Tcode : OPL8) : Define the Production Version Slection either 1 for manual and 2 for automatic. (if you use automatic system will select the version based on the material master selection method )
regards
radhak mk -
Reg: Creation of BOM along with Alternative BOM
Hi Experts,
I have written the below code for creating BOM along with Alternative BOM, I'm getting the following error.
W BAPI1080 028
Error/warning when checking the structure of the BOM group with ID=
A BAPI1080 002
Basic data for (BOM) group available twice
A BAPI 001
No instance of object type BOMGroup has been created. External reference:
W BAPI1080 028
Error/warning when checking the structure of the BOM group with ID=
A BAPI1080 002
Basic data for (BOM) group available twice
A BAPI 001
No instance of object type BOMGroup has been created. External reference:
Please find the piece of code below.
SORT it_bom01 BY matnr idnrk posnr ASCENDING.
LOOP AT it_bom01 INTO wa_bom01.
AT NEW matnr.
CLEAR:
it_bomgroup[],
wa_bomgroup,
it_variants[],
wa_variants,
it_items[],
wa_items,
it_matrel[],
wa_matrel,
it_itemas[],
wa_itemas,
it_return.
ENDAT.
* Material BoM Group Header Data
wa_bomgroup-bom_group_identification = 'IDENTIFICATION'.
wa_bomgroup-object_type = 'BGR'.
wa_bomgroup-object_id = 'ID'.
wa_bomgroup-bom_usage = wa_bom01-stlan.
wa_bomgroup-ltxt_lang = sy-langu.
wa_bomgroup-technical_type = ' '.
* wa_bomgroup-bom_text = .
wa_bomgroup-created_in_plant = wa_bom01-werks.
APPEND wa_bomgroup TO it_bomgroup.
* Header Details of the different variants
wa_variants-bom_group_identification = 'IDENTIFICATION'.
wa_variants-object_type = 'BOM'.
wa_variants-object_id = 'ID'.
wa_variants-alternative_bom = wa_bom01-stlal.
wa_variants-bom_status = wa_bom01-stlst.
wa_variants-base_qty = wa_bom01-bmeng.
wa_variants-valid_from_date = wa_bom01-datuv.
wa_variants-alt_text = wa_bom01-alt_text.
wa_variants-function = 'NEW'.
APPEND wa_variants TO it_variants.
* Details of the items of the variants
wa_items-bom_group_identification = 'IDENTIFICATION'.
wa_items-object_type = 'ITM'.
wa_items-object_id = 'ID'.
wa_items-item_no = wa_bom01-posnr.
wa_items-item_cat = wa_bom01-postp.
wa_items-component = wa_bom01-idnrk.
wa_items-comp_qty = wa_bom01-menge.
wa_items-valid_from_date = wa_bom01-datuv.
APPEND wa_items TO it_items.
* Details of the materials of the different variants
CLEAR it_matrel.
wa_matrel-bom_group_identification = 'IDENTIFICATION'.
wa_matrel-material = wa_bom01-matnr.
wa_matrel-plant = wa_bom01-werks.
wa_matrel-bom_usage = wa_bom01-stlan.
wa_matrel-alternative_bom = wa_bom01-stlal.
APPEND wa_matrel TO it_matrel.
* Linking items to the corresponding variants
CLEAR it_itemas.
wa_itemas-bom_group_identification = 'IDENTIFICATION'.
wa_itemas-sub_object_type = 'ITM'.
wa_itemas-sub_object_id = 'ID'.
wa_itemas-super_object_type = 'BOM'.
wa_itemas-super_object_id = wa_bom01-matnr.
wa_itemas-valid_from_date = wa_bom01-datuv.
wa_itemas-function = 'NEW'.
APPEND wa_itemas TO it_itemas.
AT END OF matnr.
CALL FUNCTION 'BAPI_MATERIAL_BOM_GROUP_CREATE'
EXPORTING
all_error = 'X'
TABLES
bomgroup = it_bomgroup
variants = it_variants
items = it_items
materialrelations = it_matrel
itemassignments = it_itemas
return = it_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
LOOP AT it_return.
WRITE:/ it_return-type, it_return-id, it_return-number,
it_return-message.
ENDLOOP.
ENDAT.
ENDLOOP.
Thanks and Regards,
Abdur RafiqueHi Sree,
I used your code, I removed the levels because, i have only one level 'the lineitems'. Please find the modified code below. I'm not able to create the BOM, it throws an error as "BOM is recursive". I checked the header and item contents before passing to FM, it is correct.
Please help me with the solution.
REPORT zbom_sdn.
TYPE-POOLS: truxs.
DATA: bom_header LIKE cad_bicsk,
bom_item TYPE TABLE OF cad_bom_item WITH HEADER LINE,
bom_sub_item TYPE TABLE OF cssubitem WITH HEADER LINE,
dms_class_data TYPE TABLE OF cls_charac WITH HEADER LINE,
sap_field_data TYPE TABLE OF rfcdmsdata WITH HEADER LINE,
e_return LIKE cad_return-value,
e_message LIKE message-msgtx,
e_message_len LIKE cad_return-message_len.
DATA v_item TYPE i.
TYPES : BEGIN OF ty_data,
matnr TYPE cad_bicsk-matnr," Material
werks TYPE csap_mbom-werks," Plant
stlan TYPE csap_mbom-stlan," BOM Usage
datuv TYPE csap_mbom-datuv," Valid From
* posnr TYPE stpo_api03-item_no," Item Number
idnrk TYPE stpo_api03-component," BOM Component
postp TYPE stpo_api03-item_categ," Item category
menge TYPE cad_bom_item-menge," Quantity
bmeng TYPE stko_api01-base_quan," Base Qty
stlst TYPE stko_api01-bom_status," BOM Status
stlal TYPE csap_mbom-stlal," Alternative BOM
alt_text TYPE stko_api01-alt_text," Alternative BOM text
END OF ty_data.
DATA : it_data TYPE TABLE OF ty_data ,
wa_data TYPE ty_data.
DATA: wa_raw TYPE truxs_t_text_data.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
dynpro_number = syst-dynnr
CHANGING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = wa_raw " Work Table
i_filename = p_file
TABLES
i_tab_converted_data = it_data[] " Actual Table
EXCEPTIONS
conversion_failed = 1
OTHERS = 2 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR: bom_header, bom_item, bom_sub_item.
REFRESH: bom_item, bom_sub_item.
DATA : v_lineitem TYPE sposn VALUE '0000',
v_slineitem TYPE sposn VALUE '0'.
LOOP AT it_data INTO wa_data.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_data-matnr
IMPORTING
output = wa_data-matnr.
* fill BOM header
CLEAR bom_header.
bom_header-matnr = wa_data-matnr. "'000000000200000016'.
bom_header-stlal = wa_data-stlal. " Alternative Bom
bom_header-werks = wa_data-werks. "'1000'.
bom_header-stlan = wa_data-stlan. "'3'.
bom_header-bmeng = wa_data-bmeng.
bom_header-cadkz = 'X'.
bom_header-stktx = wa_data-alt_text.
* bom_header-ztext = wa_data-text.
bom_header-datuv = wa_data-datuv."'01.10.2010'.
* fill item
v_lineitem = v_lineitem + 10.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_lineitem
IMPORTING
output = v_lineitem.
* bom_item-upskz = 'X'. " If We hav the Sub items Enable it.
bom_item-idnrk = wa_data-matnr. "'000000000200000017'.
bom_item-posnr = v_lineitem.
bom_item-postp = wa_data-postp."'L'.
bom_item-menge = wa_data-menge. "'1'.
* bom_item-fmeng = wa_data-fqty.
APPEND bom_item.
CLEAR: bom_item.
AT END OF matnr.
CALL FUNCTION 'CAD_CREATE_BOM_WITH_SUB_ITEMS'
EXPORTING
i_bom_header = bom_header
i_auto_posnr = ''
IMPORTING
e_return = e_return
e_message = e_message
e_message_len = e_message_len
e_bom_header = bom_header
TABLES
bom_item = bom_item
bom_sub_item = bom_sub_item
dms_class_data = dms_class_data
sap_field_data = sap_field_data
EXCEPTIONS
OTHERS = 1.
REFRESH bom_item.
WRITE : e_message.
ENDAT.
CLEAR wa_data.
ENDLOOP.
Thanks and Regards,
Abdur Rafique
Maybe you are looking for
-
Need Advice on External Hard Drive Error
I just purchased the OWC 750g External Firewire HD for my Imac G4, plugged it in and it appeared in my Finder. The User Guide says that I need to use Disc Utility to repartition the drive, which I did, in 3 partitions - two to be bootable drives for
-
Some pages not displaying columns properly since FF 37.0.1 update
The problem showed up on some pages on Lynda.com. IE 11 does not have the problem. Here is a screen shot of a problem page on Lynda.com in FF, showing the column displaying wrongly: https://support.cdn.mozilla.net/media/uploads/images/2015-04-08-23-3
-
Generate auto invoice partially against partial PO Receipts
Dear All, Is it possible to do partial receipt against a PO , and generate Payables auto invoice for this partial receipts in 11.5.10.2? Please update... many thanks in advance...
-
Loadjava and System class error
$ loadjava -user dev/dev ./tickets.jar Error while creating resource META-INF/MANIFEST.MF ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler help! [email protected]
-
Where can I find the GPS coordinates in iPhoto 11 for geotagged pics? In iPhoto 09 this information was available under the Photos menu "Show Extended Photo Information".