Automate

 View Only
  • 1.  DownLoad multilevel BoM using CS_BOM_EXPL_MAT_V2_RFC

    Posted 05-05-2021 01:32
    ​HI Experts,
    I have a requirement to download multilevel Bom's as shown in transaction CS12. I am using Bapi "CS_BOM_EXPL_MAT_V2_RFC" to build this requirement.
    I am able to build the script for one material .The script basically depends on the loop id column i.e I need to know beforehand how many component/level are under it so that I can insert D's in loop id column.
    Can somebody help me to automate this part .? I basically need to run this script for multiple materials . How can we adjust the loop condition in this case.? or is there a way we could create a script to read the number of lines in CS12 and link it to this script so that the insertion of D's in loop id column in automated in the excel template.

    I am attaching here my version of the scripts & template.

    ------------------------------
    AAKANSHA GUPTA | SAP Data migration consultant
    Moog GmbH |
    ------------------------------


  • 2.  RE: DownLoad multilevel BoM using CS_BOM_EXPL_MAT_V2_RFC

    Employee
    Posted 05-05-2021 11:25
      |   view attached
    Hi Aakansha

    You might need a combo of the attached script, which will download the number of components, and macros to format the output.

    The attached script uses the usual inputs to CS02, but simply downloads a hidden field that holds the number of components


    Hope this helps,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------

    Attachment(s)



  • 3.  RE: DownLoad multilevel BoM using CS_BOM_EXPL_MAT_V2_RFC

    Posted 05-06-2021 01:35
    Hi Sigrid,

    ​Thank you very much for your response. This is definitely a nice trick but unfortunately I am looking for transaction CS12.
    is there any way , I can read no of lines in tcode CS12.?

    Regards
    Aakansha

    ------------------------------
    Aakansha Gupta | SAP DATA MIGRATION CONSULTANT
    Moog GmbH | +918130780074
    ------------------------------



  • 4.  RE: DownLoad multilevel BoM using CS_BOM_EXPL_MAT_V2_RFC

    Employee
    Posted 05-06-2021 10:41
    Sorry, you're right, Aakansha. 

    I checked out CS12, and it doesn't look like it.

    You're best bet is to estimate on the maximum number of components in the multi-level bom and use that for the components output.

    Best Regards,
    Sigrid


    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------