Function Module for Variant Configuration

Is there any Function Modules available for getting the Characteristics and values of configured material. Input will be a material number.
Points assured for any helpful answers

Hello,
I don't think FM is available for getting the Characteristics values of the Material . Better use this code.
* Selection for class
  IF NOT S_KLART[] IS INITIAL.
    PERFORM F_GET_OBJECTNUMBER.
  ENDIF.
  IF G_CLASS_NE IS INITIAL.
* Fill Selection table fields
    PERFORM F_FILL_FIELDS.
* Selection for materials
    PERFORM F_GET_MATERIAL.
    SORT G_T_MAT BY MATNR.
* Read if necessary classification
    IF G_T_MATNR[] IS INITIAL AND ( NOT G_T_MAT[] IS INITIAL ).
      PERFORM F_GET_MAT_KLASS.
    ENDIF.
* Select the basic data text and fill final table
    PERFORM F_GET_BASIC_TEXT.
  ENDIF.
FORM F_GET_OBJECTNUMBER.
  DATA: L_R_OBJECTS  TYPE TY_OBJECTS.
  DATA: L_OBJECTS TYPE TY_OBJECTS.
  CLEAR: G_T_OBJECTS.
  REFRESH: G_T_OBJECTS.
  SELECT A~CUOBJ A~OBJEK A~KLART B~ATINN B~ATZHL B~ATWRT B~ATFLV
         B~ATAWE B~ATFLB B~ATAW1 C~CLINT D~CLASS
    INTO CORRESPONDING FIELDS OF TABLE G_T_OBJECTS
    FROM INOB AS A INNER JOIN AUSP AS B
      ON A~CUOBJ = B~OBJEK AND
         A~KLART = B~KLART
         INNER JOIN KSSK AS C
         ON B~OBJEK = C~OBJEK AND
            B~KLART = C~KLART
         INNER JOIN KLAH AS D
         ON C~CLINT = D~CLINT
   WHERE A~OBJEK IN S_MATNR AND
         A~OBTAB EQ 'MARA'  AND
         A~KLART IN S_KLART AND
         B~ADZHL EQ '0000'  AND
         C~LKENZ EQ ' '     AND
         D~CLASS IN S_CLASS.
  CLEAR : G_T_KSML.
  REFRESH: G_T_KSML.
  SELECT CLINT IMERK KLART
   FROM KSML
   INTO CORRESPONDING FIELDS OF TABLE G_T_KSML
    FOR ALL ENTRIES IN G_T_OBJECTS
  WHERE CLINT EQ G_T_OBJECTS-CLINT.
  IF NOT G_T_KSML[] IS INITIAL.
    SORT G_T_KSML BY CLINT.
    SORT G_T_OBJECTS BY CUOBJ OBJEK  CLASS ATINN.
    LOOP AT G_T_KSML.
      READ TABLE G_T_OBJECTS WITH KEY ATINN = G_T_KSML-IMERK
                                      CLINT = G_T_KSML-CLINT
                                      BINARY SEARCH.
      IF SY-SUBRC NE 0.
        CLEAR: L_OBJECTS.
        READ TABLE G_T_OBJECTS WITH KEY KLART = G_T_KSML-KLART
                                        CLINT = G_T_KSML-CLINT
                                        BINARY SEARCH.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING G_T_OBJECTS TO L_OBJECTS.
          CLEAR G_T_OBJECTS.
          G_T_OBJECTS-ATINN = G_T_KSML-IMERK.
          G_T_OBJECTS-KLART = G_T_KSML-KLART.
          G_T_OBJECTS-CLINT = G_T_KSML-CLINT.
          G_T_OBJECTS-CUOBJ = L_OBJECTS-CUOBJ.
          G_T_OBJECTS-OBJEK = L_OBJECTS-OBJEK.
          G_T_OBJECTS-CLASS = L_OBJECTS-CLASS.
          APPEND G_T_OBJECTS.
          CLEAR G_T_OBJECTS.
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
  DELETE ADJACENT DUPLICATES FROM G_T_OBJECTS
                               COMPARING OBJEK KLART CLASS ATINN ATAWE.
  IF NOT G_T_OBJECTS[] IS INITIAL.
    SORT G_T_OBJECTS BY CUOBJ OBJEK  CLASS ATINN.
    CLEAR: G_T_MATNR,G_R_MATNR,G_T_CLASSDESC,G_T_CHARDESC,G_T_CABN,
           G_T_CAWNT.
    REFRESH: G_T_MATNR,G_T_CLASSDESC,G_T_CHARDESC,G_T_CABN,G_T_CAWNT..
    SELECT CLINT KSCHL
      FROM SWOR
      INTO CORRESPONDING FIELDS OF TABLE G_T_CLASSDESC
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE CLINT EQ G_T_OBJECTS-CLINT AND
           KLPOS EQ '01'              AND
           SPRAS EQ SY-LANGU.
    IF NOT G_T_CLASSDESC[] IS INITIAL.
      SORT G_T_CLASSDESC BY CLINT.
    ENDIF.
    SELECT ATINN ATBEZ
      FROM CABNT
      INTO CORRESPONDING FIELDS OF TABLE G_T_CHARDESC
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE ATINN EQ G_T_OBJECTS-ATINN AND
           SPRAS EQ SY-LANGU.
    IF NOT G_T_CHARDESC[] IS INITIAL.
      SORT G_T_CHARDESC BY ATINN.
    ENDIF.
    SELECT ATINN MSEHI
      FROM CABN
      INTO CORRESPONDING FIELDS OF TABLE G_T_CABN
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE ATINN EQ G_T_OBJECTS-ATINN.
    SELECT ATINN ATWTB
     FROM CAWNT
     INTO CORRESPONDING FIELDS OF TABLE G_T_CAWNT
      FOR ALL ENTRIES IN G_T_OBJECTS
    WHERE ATINN EQ G_T_OBJECTS-ATINN AND
          ADZHL EQ '0000'            AND
          SPRAS EQ SY-LANGU.
    LOOP AT G_T_OBJECTS.
      AT NEW OBJEK.
        G_R_MATNR-MATNR = G_T_OBJECTS-OBJEK.
        APPEND G_R_MATNR TO G_T_MATNR.
      ENDAT.
    ENDLOOP.
  ENDIF.
  IF G_T_MATNR[] IS INITIAL.
    G_CLASS_NE = 'X'.
  ENDIF.
ENDFORM.                    " f_get_objectnumber
FORM F_GET_MAT_KLASS.
  DATA: BEGIN OF L_T_OBJECT OCCURS 0,
         OBJEK TYPE OBJNUM,
         MATNR TYPE MATNR,
        END OF L_T_OBJECT.
  DATA: L_OBJECTS TYPE TY_OBJECTS.
  CLEAR: L_T_OBJECT.
  REFRESH: L_T_OBJECT.
* Fill the object number
  LOOP AT G_T_MAT INTO G_R_MAT.
    AT NEW MATNR.
      L_T_OBJECT-OBJEK = G_R_MAT-MATNR.
      L_T_OBJECT-MATNR = G_R_MAT-MATNR.
      APPEND L_T_OBJECT.
    ENDAT.
  ENDLOOP.
  CLEAR:G_T_OBJECTS,G_T_CLASSDESC,G_T_CHARDESC,G_T_CABN,G_T_KSML,
        G_T_CAWNT.
  REFRESH: G_T_OBJECTS,G_T_CLASSDESC,G_T_CHARDESC,G_T_CABN,G_T_KSML,
           G_T_CAWNT.
* Get the material classification details
  SELECT A~CUOBJ A~OBJEK A~KLART B~ATINN B~ATZHL B~ATWRT B~ATFLV
         B~ATAWE B~ATFLB B~ATAW1 C~CLINT D~CLASS
    INTO CORRESPONDING FIELDS OF TABLE G_T_OBJECTS
    FROM INOB AS A INNER JOIN AUSP AS B
      ON A~CUOBJ = B~OBJEK AND
         A~KLART = B~KLART
         INNER JOIN KSSK AS C
         ON B~OBJEK = C~OBJEK AND
            B~KLART = C~KLART
         INNER JOIN KLAH AS D
         ON C~CLINT = D~CLINT
     FOR ALL ENTRIES IN L_T_OBJECT
   WHERE A~OBJEK EQ L_T_OBJECT-OBJEK AND
         A~OBTAB EQ 'MARA'  AND
         A~KLART IN S_KLART AND
         B~ADZHL EQ '0000'  AND
         C~LKENZ EQ ' '     AND
         D~CLASS IN S_CLASS.
  IF NOT G_T_OBJECTS[] IS INITIAL.
    SELECT CLINT IMERK KLART
      FROM KSML
      INTO CORRESPONDING FIELDS OF TABLE G_T_KSML
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE CLINT EQ G_T_OBJECTS-CLINT.
  ENDIF.
  IF NOT G_T_KSML[] IS INITIAL.
    SORT G_T_KSML BY CLINT.
    SORT G_T_OBJECTS BY ATINN KLART.
    LOOP AT G_T_KSML.
      READ TABLE G_T_OBJECTS WITH KEY ATINN = G_T_KSML-IMERK.
      IF SY-SUBRC NE 0.
        CLEAR: L_OBJECTS.
        READ TABLE G_T_OBJECTS WITH KEY KLART = G_T_KSML-KLART.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING G_T_OBJECTS TO L_OBJECTS.
          CLEAR G_T_OBJECTS.
          G_T_OBJECTS-ATINN = G_T_KSML-IMERK.
          G_T_OBJECTS-KLART = G_T_KSML-KLART.
          G_T_OBJECTS-CLINT = G_T_KSML-CLINT.
          G_T_OBJECTS-CUOBJ = L_OBJECTS-CUOBJ.
          G_T_OBJECTS-OBJEK = L_OBJECTS-OBJEK.
          G_T_OBJECTS-CLASS = L_OBJECTS-CLASS.
          APPEND G_T_OBJECTS.
          CLEAR G_T_OBJECTS.
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF NOT G_T_OBJECTS[] IS INITIAL.
    SELECT CLINT KSCHL
      FROM SWOR
      INTO CORRESPONDING FIELDS OF TABLE G_T_CLASSDESC
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE CLINT EQ G_T_OBJECTS-CLINT AND
           KLPOS EQ '01'              AND
           SPRAS EQ SY-LANGU.
    IF NOT G_T_CLASSDESC[] IS INITIAL.
      SORT G_T_CLASSDESC BY CLINT.
    ENDIF.
    SELECT ATINN ATBEZ
      FROM CABNT
      INTO CORRESPONDING FIELDS OF TABLE G_T_CHARDESC
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE ATINN EQ G_T_OBJECTS-ATINN AND
           SPRAS EQ SY-LANGU.
    IF NOT G_T_CHARDESC[] IS INITIAL.
      SORT G_T_CHARDESC BY ATINN.
    ENDIF.
    SELECT ATINN MSEHI
    FROM CABN
    INTO CORRESPONDING FIELDS OF TABLE G_T_CABN
     FOR ALL ENTRIES IN G_T_OBJECTS
   WHERE ATINN EQ G_T_OBJECTS-ATINN.
    SELECT ATINN ATWTB
      FROM CAWNT
      INTO CORRESPONDING FIELDS OF TABLE G_T_CAWNT
       FOR ALL ENTRIES IN G_T_OBJECTS
     WHERE ATINN EQ G_T_OBJECTS-ATINN AND
           ADZHL EQ '0000'            AND
           SPRAS EQ SY-LANGU.
  ENDIF.
ENDFORM.                    " f_get_mat_klass
If useful reward.
Vasanth

Similar Messages

  • BAPI or Function maodule for Variant configuration

    Hi,
    Is there any BAPI or Function module which can give Variant configuration for a sales order?
    Thanks,
    Madhu

    hi
    plz refer to the following code
    Check the following Code & also Check the following Standard Programs
    L2032U12
    LCRMAU01
    LCRMAU11
    LZOC1U01
    MWWMJF32
    RBUS2032
    Structures for order header
    DATA: l_order_header_in LIKE bapisdhd1,
    l_order_header_inx LIKE bapisdhd1x,
    Tables for order items
    li_order_items_in TYPE STANDARD TABLE OF bapisditm,
    li_order_items_inx TYPE STANDARD TABLE OF bapisditmx,
    Order partners
    li_order_partners TYPE STANDARD TABLE OF bapiparnr,
    *Schedule lines
    li_ORDER_SCHEDULES_IN TYPE STANDARD TABLE OF BAPISCHDL,
    li_ORDER_SCHEDULES_INX TYPE STANDARD TABLE OF BAPISCHDLX,
    *-condition type
    li_ORDER_CONDITIONS_IN TYPE STANDARD TABLE OF BAPICOND,
    li_ORDER_CONDITIONS_INX TYPE STANDARD TABLE OF BAPICONDX,
    Return table from bapi call
    li_return TYPE STANDARD TABLE OF bapiret2,
    Sales document number
    l_vbeln LIKE bapivbeln-vbeln,
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
    order_header_in = l_order_header_in
    order_header_inx = l_order_header_inx
    testrun = 'X'
    IMPORTING
    salesdocument = l_vbeln
    TABLES
    return = li_return
    order_items_in = li_order_items_in
    order_items_inx = li_order_items_inx
    order_partners = li_order_partners
    ORDER_SCHEDULES_IN = li_ORDER_SCHEDULES_IN
    ORDER_SCHEDULES_INX = li_ORDER_SCHEDULES_INX
    ORDER_CONDITIONS_IN = li_ORDER_CONDITIONS_IN
    ORDER_CONDITIONS_INX = li_ORDER_CONDITIONS_INX.
    Thanks & Regards
    ravish
    <b>* plz rewrd points if helpful</b>

  • BAPI/FUNCTION  module for the configure varient data(MRP3 -MM02)

    Hi all,
    I have  a requirenent to send the configure varient data(MRP3 -MM02) to another system.Please guide me how it can be created in receving system.ie please provide a function module or BAPI for the same.
    Thanks.
    Edited by: sanu debu on May 11, 2009 11:01 AM

    I am also looking for the same requirment . could you please let me know if you find any BAPI.

  • Function module for quotation configuration update

    Hi,
    I am trying to update the configuration data for an item in quotation. This is a new item i am trying to insert in a quotation using BAPI 'BAPI_CUSTOMERQUOTATION_CHANGE' but not able to update/change the configuration data.
    I am able to upload this data in quotation create, is there any specific value I am missing to pss to the above BAPI or is there any other FM to change/update the config data for item in a quotation?

    My first question to you is - Do you have a COMMIT WORK statement in your program after the BAPI is executed.
    Second - the BAPI function module has a RETURN table. What values are returned ?

  • Tables, function modules for variant config data

    Hi all,
    I need to extract characteristics and values for variant material from sales order and production orders. Could you please tell me the relevant tables and function modules?
    Regards,
    Sachin M

    Hi
    Try the following;
    Function module to find values of characteristics - CLAF_CLASSIFICATION_OF_OBJECTS .
    Table # AUSP also holds values of characteristics, you can link to it via table INOB,which should also linked to table KONDH if you are using the same.
    Transaction code for Variant Config - CC04 (Product Structure browser)
    Cheers
    Chandra

  • Function Module for creation of variant in BADI

    I need to create a variant to store shipment no's which are coming in BADI. And variant need to be passed to a report which has to be run  Background. can anyone help me out how to do it. Can anyone know the function module for this.

    Hi Anirban,
    Use the bapi BAPI_BUSPROCESSND_CREATEMULTI to achieve the same.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • How to config Check Digits function module for Student Number Validation

    Hi SLCM Experts,
    In the SAP-SLCM, How to use check digits function module for validate student number.  Just only config it or need to customizing program.
    *Any idea to student number validation in SLCM?*
    Best Regards,
    Suvatchai K.

    Hi ,
    Can you expalin it further ?
    You configure the St. no in piq_matr . And set it  as external or internal no. range which suits your business .
    What is the validation you are looking for ?
    Regards
    Gajalakshmi

  • Function Module for creating Functional Location BOM and Equipment BOM

    Hi All,
    Is there any function module for creating and changing Functional Location BOM and Equipment BOM ???

    Hi,
    Tables for Eq., BOM: EQST, STKO, STPO.
    Tables fro Fun., Loc., BOM: TPST, STKO, STPO.
    You can use FMs: CS_BOM_EXPL_TPL_V1, CS_BOM_EXPL_EQU_V2 & CS_BOM_EXPL_MAT_V2 for extracting the appropriate BOM related data.
    And for the Alternatives please check the customizing or check with your respective Module experts for the appropriate configuration.
    Hope this helps.
    Best Regards, Murugesh AS

  • Function module for fiscal year

    Hi all,
    can you please suggest me the function module for automatic generation of fiscal year.
    Thanks and regards,
    S.Latha.

    Hi Latha,
    Please find below the code for auto generation of the fiscal year.
      l_date = sy-datum.       "l_date should declared of type sy-datum
    Use the function module to get the period
          CALL FUNCTION 'MC_PERIODE_ZUM_DATUM'
               EXPORTING
                    idate        = l_date
                    iperkz      = l_p         " 'P'
                    iperiv       = l_periv   "V6
               IMPORTING
                    eperid       = l_period
               EXCEPTIONS
                    wrong_period = 1
                    OTHERS       = 2.
    l_fiscal = l_period+0(4).
    l_p - 'P'   i. e. Is the period indicator (Period according to fiscal year variant)
    l_periv - 'V6'  i.e. Is the Fiscal year variant. Here it is V6 which relates country 'US'.
    l_period - gives you the Fiscal period.
    l_fiscal -  The first four digits of l_period gives you the 'Fiscal year'.
    Hope this helps you !.
    Thanks & Regards,
    MM Jaffer.
    Edited by: MohammedJaffer on Aug 10, 2010 12:53 PM

  • BAPI/Function Module for approve Appropriation Request?

    Hi Friends,
    Please guide me for
    BAPI/Function Module for approve Appropriation Request?
    Regards
    Ricky

    Hello
    Check these BAPI
    BAPI_APPREQUEST_ADDVARIANT     Add a Variant to an Appropriation Request
    BAPI_APPREQUEST_CHANGE         Change an Appropriation Request
    BAPI_APPREQUEST_CHANGEVARIANT  Change Appropriation Request Variant
    BAPI_APPREQUEST_CREATE         Create Appropriation Request
    BAPI_APPREQUEST_DELETE         Deletion of an Appropriation Request
    BAPI_APPREQUEST_GETDETAIL      Display of an Appropriation Request
    BAPI_APPREQUEST_GETSTATUS      Display Status of an Appropriation Request
    BAPI_APPREQUEST_REMOVEVARIANT  Delete an Appropriation Request Variant
    BAPI_APPREQUEST_SETSTATUS      Setting System and User Status of Appropriation Request
    BAPI_APPREQUEST_SETSTATUSVARNT Setting of User and System Status on Variants

  • Function module for assigned wage types

    Hi experts,
    We need wage type wise count and sum of the amount for each wage type defined in infotype '0008' for the given from and to dates. Is there any function module available for the same.
    Please suggest.
    Regards,
    Kaustubh Kabre.

    Hi,
    <li>I do not look for function module for this case as i know that we can or have to read wage types and corresponding amount in the program. LDB PNP should be given in program attributes.
    REPORT RPABAP06.
    TABLES:PERNR.
    INFOTYPES:0008.
    DATA: BEGIN OF WAGETYPES,
       LGA LIKE P0008-LGA01,
       BET LIKE P0008-BET01,
       ANZ LIKE P0008-ANZ01,
       EIN LIKE P0008-EIN01,
       OPK LIKE P0008-OPK01,
      END OF WAGETYPES.
    DATA:total type P0008-BET01.
    GET PERNR.
    RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
    DO 20 TIMES VARYING WAGETYPES-LGA FROM P0008-LGA01 NEXT P0008-LGA02
                VARYING WAGETYPES-BET FROM P0008-BET01 NEXT P0008-BET02.
    IF WAGETYPES-LGA IS INITIAL.
    EXIT.
    ELSE.
    TOTAL = TOTAL + WAGETYPES-BET.
    WRITE: / WAGETYPES-LGA, WAGETYPES-BET.
    ENDIF.
    ENDDO.
    WRITE TOTAL.
    Thanks
    Venkat.O

  • Function module for sales order VC characteristics

    Hi All,
    Is there any function module for fetching sales oder VC characteristics.
    Regards

    Please use FM: VC_I_GET_CONFIGURATION.
    Please pass "VBAP-CUOBJ"  in the exporting parameter INSTANCE and it should return you configuration in the Table parameter 'CONFIGURATION'.
    Let me know if this works.
    Thanks,
    Neeraj

  • Function Module for message "MBGMCR" in outbound process

    Hi all,
    I want to create an IDoc via EDI when I post a material document. I use messgae type MBGMCR and IDoc type MBGMCR02 and I already configured in partner profile and all about output determination in SAP-IM.
    And now I need a function module to process outbound IDoc of posting material document but I couldn't find a function module for processing.
    Pls let me know about that.
    Thanks for your time.

    Hi,
    You need to Code your own Z Function Module for this. Copy any standard outbound FM to create your own Z FM, so as to ensure that Interfaces are correct.  
    Refer to given below threads:
    Re: Standard IDOC for Goods Receipt
    Re: Idoc type for Goods Receipt
    Goods Receipt MIGO IDOC

  • Functional module for scrap

    Dear All,
    can any body pl tell me what are the function modules system uses for scrapping through MB1A.
    Regards,
    Anil

    Hi..
    when we run the MB1A and mov type 551/555 and scrap the material for this in standard program system calls the function module.
    i have done configuration in my QM notification and in the action box i have defined the action for that i have given the function module    QMLR_POST_TO_SCRAP
    like this is there any function module for scrapping ?
    Regards,

  • Functional module for automatic creation of pur requisition & pur order

    hello,
    what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
    please let me know as early as possible
    regards,
    rajesh kumar raju

    Hi,
             Please check with following.
    IDOC_INPUT_ACC_PURCHASE_REQUI
    IDOC_INPUT_ACC_PURCHASE_ORDER
    /ISDFPS/OR_PURCHASE_ORDER_CR
    BS01_PURCHASE_DOCUMENT_CREATE
    CO_MP_CREATE_PURCHASE_ORDER
    Thanks & Regards
    Sadhu Kishore

Maybe you are looking for

  • How to extract data from CLOB and insert them into DB?

    Hi PL/SQL Gurus, I have no experience in PL/SQL, but I have a requirement now where I have to use it. We have a table with 10 columns, one of them is a CLOB and it holds XML data. The XMLs are very huge in size. Two new columns are added to the table

  • Strange File in Skype Process

    Can Skype explain the presence of a file running as a process with a .tmp extension? The file SKYDC1E.TMP is the file in question running out of the Windows\TEMP Directory. Is this a legitimate Skype process? Where one would expect the SKYPE executab

  • QT 7.5.5 - 99% CPU usage

    have an Acer Aspire 3000. running Windows home XP, SP3. Mobile AMD Sempron 3000+ prcessor, 1.8 GHz, 448 RAM. When I run QT 7.5.5 *(not pro)* I get 99% CPU usage (thats just running in idle not playing anything). Interestingly, When I don't have Inter

  • Error in deployin web service

    Why i receive this message when deploy my web-service? Use the following context root(s) to test your web application(s): http://nb-luca:????/ProvaSeriale-ProvaSeriale-context-root Note: JDeveloper was unable to determine the HTTP port number of the

  • Sync movie from ipad to computer?

    How do I sync to my computer a movie I bought on the iPad?