Dynamic select views for MM01 Transaction

Hii  Friends,
I have an issue like i need to dynamically select the views in MM01 transaction from the BDC program
without selecting that views manually.
Using SHDB recording i can select the views before recording  and then call those views again
If i want to select the views from the program how do i do it..
If there is any way to do this in call transaction let me know plz
Thanks in advance
kishore

BDC is not good for MM01 , go for bapi
other wise go for  LSMW bapi method...
Business Object      BUS1001006   Standard material
Method               SAVEDATA                    Create and change materia
Message Type         MATMAS_BAPI                 Create and change materia
Basic Type           MATMAS_BAPI02               Create and Change Materia

Similar Messages

  • Problem in selecting views in MM01 Transaction

    Hi,
    I want to know where can i configure views (In SPRO) for a particular Industry sector and material type for a material.In my case some view are getting displayed when i enter a material in MM01 transaction i want to select some more views for that material.
    Regards,
    Mukesh Kumar

    Hi,
    Go to Logistics general -> material master -> basic settings -> material types -> Define attributes of material types.
    Select the reqired material type and click on details ( Mirror glass)
    regards,

  • Passing dynamic selection parameters for fagll03 transaction

    hi experts,
    im trying to call  a transaction ( fagll03) in my report with the input parameters via selection screen (using SUBMIT ) , but iwant to pass the profit center  values to the transaction fagll03 , but the profit center is in dynamic selection , i just tried with some code , but it is not working, can any one just tell me briefly how to pass the profit center variable to the dynamic selection screen in fagll03. if u have any code please update me , it will be more useful.
    Regards,
    Venkat.

    Look at FM FREE_SELECTIONS_RANGE_2_EX which will build the correct parameter to use in the WITH FREE SELECTION option.
    First read Abap documentation at SAP online help [WITH FREE SELECTIONS texpr |http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_5@5@] in [SUBMIT - selscreen_parameters|http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm] of [SUBMIT|http://help.sap.com/abapdocu/en/ABAPSUBMIT.htm] (or press F1 on SUBMIT)
    Also look if those notes are relevant for your system
    - [Note 965988 - FAGLL03: 'Dynamic selections' are ignored|https://service.sap.com/sap/support/notes/965988]
    - [Note 1105201 - FAGLL03: 'Custom selections' are ignored|https://service.sap.com/sap/support/notes/1105201]
    Regards,
    Raymond

  • Dynamic selection screen for FDK43

    HI All,
    I need to add a field (accounting clerk - BUSAB)in the dynamic selection-screen  of transaction FDK43.
    I used se36 to view the current selection-screen view and it does show me the field accouting clerk under functional group  - 04  (Company Code) .The field is ticked for preselect.
    However I am not able to see this field (BUSAB) in the dynamic selection when I run transaction FDK43.
    Any idea on how to make the function group 04 available for selection  ? or maybe even the field in it available for selection ?
    Regards,
    Shital

    hi
    use this link
    Dynamic selection screen
    Cheers
    Snehi

  • Add certain field at dynamic selection screen in FBL3N transaction

    Hello Expert,
    I would like to add entry date field (BKPF-CPUDT) at dynamic selection screen in FBL3N transaction.
    So, I went to SE36 transaction and changed something in selection view for SDF.
    However, it didn't work.
    Is there anyone who knows how to add a certain field at dynamic selection screen in FBL3N transaction?
    Thanks in advance.
    BR,
    Chris Kim

    Hi
    Refer to the following thread
    Additional field selections in FB03
    It talks about adding Header Text field
    You should be able to add entry date similarly
    Regards
    Sach!n

  • Which table the dynamic selection view will be stored

    Dear Freinds,
                      I  have created a dynamic selections view form Se80 > Editobject>Selection view > Created by adding the required tables pa0002,pa006,pa0009 . But the transport request we have saved it locally
    now i want to create a transport request for the dynamic view . Could any please let me know how to create transport reqest for the Dynamic selection
    View which has been created.
    regards
    divya

    HiDivya,
    yo have saved the changes into local object and now you want to generate the TRN and for the save you have to change the attribute > GOTO > Other object Entry and  changed the package and TRN will generate .
    Regards
    Sheetal

  • BDC code for MM01 Transaction

    Hi All,,
                 Please give Entire BDC code for MM01 Transaction.
    i will change as per my requirement.
    I think this is already done by some ABAP Consultants.
    plz dont give answers like do recording for that transaction MM01. I know recording...
    For time constraiint, I have to complete soon.....
    Thanks in Advance
    BestRegards,
    Anil

    Hi,
    The below code is using the Session Method
    report ZDS_BDC_MM01
           no standard page heading line-size 255.
    include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: XFELD
            KZSEL_02_005(001),
    * data element: MAKTX
            MAKTX_006(040),
    * data element: MEINS
            MEINS_007(003),
    * data element: MAKTX
            MAKTX_008(040),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      ='C:\DHRUV.TXT'
       FILETYPE                      = 'DAT'
    *   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                      = RECORD
    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.
    *do.
    LOOP AT record.
    *read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'
                                  record-KZSEL_02_005.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_006.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_007.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_008.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *enddo.
    ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    *Messages
    * Message class: MS
    *613   Please enter a session name and user name
    The Below is the coding for the Call Transaction...
    report ZDS_BDC_MM01_2
           no standard page heading line-size 255.
    *include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: MAKTX
            MAKTX_005(040),
    * data element: MEINS
            MEINS_006(003),
    * data element: MTPOS_MARA
            MTPOS_MARA_007(004),
          end of record.
    DATA: FLNAME TYPE STRING.
    *** End generated data section ***
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    *** MESSAGE******
    DATA: BEGIN OF MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
            DATA: MATNR TYPE MARA-MATNR,
          END OF MESSTAB.
    ****END OF MESSAGE****
    PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
      CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME           = FILENAME.
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    FLNAME = FILENAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FLNAME
        FILETYPE                      = 'DAT'
    *   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                      = record
    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.
    LOOP AT record.
      DATA:
        CNT TYPE I.
        CNT = CNT + 1.
        REFRESH BDCDATA.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_007.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    *perform bdc_transaction using 'MM01'.
    CALL TRANSACTION 'MM01' USING BDCDATA
                            MODE 'N'
                            UPDATE 'A'
                            MESSAGES INTO MESSTAB.
    READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
       IF MESSTAB-MSGTYP = 'E'.
         MESSTAB-MATNR = RECORD-MATNR_001.
         MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
       ENDIF.
    ENDLOOP.
    FORM OPEN_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = 'MM01'
                        USER     = SY-UNAME
                        KEEP     = 'X'.
    ENDFORM.
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'MM01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = BDCDATA
       EXCEPTIONS
         INTERNAL_ERROR         = 1
         NOT_OPEN               = 2
         QUEUE_ERROR            = 3
         TCODE_INVALID          = 4
         PRINTING_INVALID       = 5
         POSTING_INVALID        = 6
         OTHERS                 = 7
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    END-OF-SELECTION.
    LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'E'.
          WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
        ENDIF.
      ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *&      Form  close_group
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM close_group .
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
       NOT_OPEN          = 1
       QUEUE_ERROR       = 2
       OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " close_group
    *&      Form  bdc_dynpro
    *       text
    *      -->P_0270   text
    *      -->P_0271   text
    FORM bdc_dynpro  USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
    *       text
    *      -->P_0275   text
    *      -->P_0276   text
    FORM bdc_field  USING  FNAM FVAL.
      IF FVAL <> ' '.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    " bdc_field
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    HTH
    Regards,
    Dhruv Shah

  • How to create transport request of Dynamic Selection view.

    Dear Freinds,
    I have created a dynamic selections view form Se80 > Editobject>Selection view > Created by adding the required tables pa0002,pa006,pa0009 . But the transport request saved it locally now i want to create a transport request for the dynamic view . Could any please let me know how to create transport request for the Dynamic selection View which has been created or could any please let me know where this dynamic selection gets stored?
    regards
    divya

    Hi Kalyan,
                    In se80> editobjects > selection view .........i have created the selection view . Now i have went into se80 and i dont find the one you have told me . could you please let me know little bit clear where i have to see .
    regards
    divya.

  • View for PAYROLL transactions

    I am working on a drilldown Report where by I need to generate ALL detailed transaction for a particular period.
    I found some views useful for some modules like XLA_AR_INV_AEL_GL_V,XLA_AR_INV_AEL_GL_V a,XLA_AR_REC_AEL_SL_V etc .
    I am not able to locate the view for PAYROLL transactions.
    I actually need a view that holds ALL the transactions posted for PayRoll in details Such as : Desc-"Salary for John for Jan" Dr"40,000". I would have taken my information from the journals(Gl_je_headers and Gl_je_lines) but that, is not detail enough.
    I notice for other modules Similar view start with "XLA_" exist.
    It is very Urgent.
    Thank You.

    I am working on a drilldown Report where by I need to generate ALL detailed transaction for a particular period.
    I found some views useful for some modules like XLA_AR_INV_AEL_GL_V,XLA_AR_INV_AEL_GL_V a,XLA_AR_REC_AEL_SL_V etc .
    I am not able to locate the view for PAYROLL transactions.
    I actually need a view that holds ALL the transactions posted for PayRoll in details Such as : Desc-"Salary for John for Jan" Dr"40,000". I would have taken my information from the journals(Gl_je_headers and Gl_je_lines) but that, is not detail enough.
    I notice for other modules Similar view start with "XLA_" exist.
    It is very Urgent.
    Thank You.

  • Student number as selection criteria for FICA transactions

    Hi experts,
    Is it possible to have the student number as a selection criteria for FICA transaction, for example for payment assignment, among others?
    Do you have a coding example?
    Regards.

    FUNCTION CMAC_EVENT_0210.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_SELTAB) LIKE  ISELTAB STRUCTURE  ISELTAB
    *"  TABLES
    *"      T_SELTAB STRUCTURE  ISELTAB
    *"  EXCEPTIONS
    *"      UNKNOWN_SELECTION
      DATA: ld_student12   TYPE piqstudent12,
            ld_partner     TYPE bu_partner,
            ld_student(12) TYPE n.
      IF i_seltab-selfn <> c_student12.
        RAISE unknown_selection.
      ELSE.
      to get leading zero's move the student number in a NUMC-field first
        ld_student   = i_seltab-selcu.
        ld_student12 = ld_student.
        CALL FUNCTION 'HRIQ_CMACBPST_SELECT_WITH_STID'
          EXPORTING
          IV_STOBJID                     =
            iv_student12                   = ld_student12
          XREAD_BUFFER                   = 'X'
          IMPORTING
            ev_partner                     = ld_partner
          EXCEPTIONS
            student_not_found              = 1
          INVALID_PARAMETER_ASSIGN       = 2
          OTHERS                         = 3
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          i_seltab-selfn = 'GPART'.
          i_seltab-selcu = ld_partner.
          CLEAR: i_seltab-xsfex,
                 i_seltab-selco,
                 i_seltab-selwu,
                 i_seltab-selwo.
          APPEND i_seltab TO t_seltab.
        ENDIF.
      ENDIF.
    ENDFUNCTION.

  • How to Handle dynamic views in mm01 transaction

    Hi ,
           Can any body say me how to handle Dynamic views in MM01 tcode. Since every time new view has to be selected, how can we manage this through our program.
    Regards,

    Hi Nilesh,
    Views will be vary based on the Material Type what u are selectiing , so u have to focus on this settings.
    Regards
    Peram

  • Bdc for mm01 transaction

    Hi friends,
        I have to upload data using mm01 transaction.
        My program has to select respective views according to material type.
        Can anybody help me.
    Thanks and regards,
    Pavani.

    Hi,
    You will save lot of time & energy if you opt to use BAPI_MATERIAL_SAVEDATA. Have a look @the sample code. Please note Do not allocate any points as this code doesn't belong to me, however I have tested it & it works fine.
    TABLES bapi_MVKEx.
    * FLAGS
    DATA: F_STOP. " Flag used to stop processing
    * DATA DECLARATIONS
    DATA : V_EMPTY TYPE I, " No. of empty records
           V_TOTAL TYPE I. " Total no. of records.
    * STRUCTURES & INTERNAL TABLES
    *--- BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control
                                      "Information
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_MVKE1 LIKE BAPI_MVKE, "Sales Data
    BAPI_RETURN LIKE BAPIRET2. " Return Parameter
    DATA: return     LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold excel file data
    DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold Matetrial descriptions
    DATA: BEGIN OF IT_MAKT OCCURS 100.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- Internal to hold the records in the text file
    DATA : BEGIN OF IT_DATA OCCURS 100,
    WERKS(4), " Plant
    MTART(4), " Material type
    MATNR(18), " Material number
    MATKL(9) , " Material group
    MBRSH(1), " Industry sector
    MEINS(3), " Base unit of measure
    GEWEI(3), " Weight Unit
    SPART(2), " Division
    EKGRP(3), " Purchasing group
    VPRSV(1), " Price control indicator
    STPRS(12), " Standard price
    PEINH(3), " Price unit
    SPRAS(2), " Language key
    MAKTX(40), " Material description
    MTPOS_MARA(4), "Item Category Group
    vkorg(4), "Sales Org
    vtweg(2), "Dist channel
    Prdha(18), "Prod Hierarchy
    ladgr(4), " Loading Group
    prctr(10), "Profit Centr
    xchpf(1), "Batch Mgmt
    kondm(2), "Material Pricing Grp
    ktgrm(2), "Account Assignment Grp
    mvgr1(4),
    mvgr2(4),
    mvgr3(4),
    versg(1), "Material Statistics Grp
    * Added fields not part of the layout
    sapmatnr(18),
    END OF IT_DATA.
    * SELECTION SCREEN. *
    SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
    PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
    'H:\DATA\Nova\rbc\zrbc129.xls'.
    PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
    PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
    P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
    P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
    P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK SCR1.
    * AT SELECTION-SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *--- Validating file
    PERFORM VALIDATE_FILE USING P_FILE.
    * START-OF-SELECTION
    START-OF-SELECTION.
    *--- Perform to convert the Excel data into an internal table
    PERFORM CONVERT_XLS_ITAB.
    IF NOT IT_DATA[] IS INITIAL.
    *--- Perform to delete Header lines
    PERFORM DELETE_HEADER_EMPTY_RECS.
    ENDIF.
    * END OF SELECTION.
    END-OF-SELECTION.
    *--- Perform to upload Material Master data
    PERFORM UPLOAD_MATMAS.
    * Form : validate_input_file
    * Description : To provide F4 help for file if read from PC
    FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    exporting
    STATIC = 'X'
    CHANGING
    FILE_NAME = F_FILE
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2.
    IF SY-SUBRC <> 0.
    *MESSAGE S010" 'Error in getting filename'.
    ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    * To convert XLS to internal table
    FORM CONVERT_XLS_ITAB.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FILE
    I_BEGIN_COL = P_BEGCOL
    I_BEGIN_ROW = P_BEGROW
    I_END_COL = P_ENDCOL
    I_END_ROW = P_ENDROW
    TABLES
    INTERN = IT_INTERN.
    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 to move the data into an internal data
    PERFORM MOVE_DATA.
    ENDFORM. " CONVERT_XLS_ITAB
    *& Form MOVE_DATA
    * text
    FORM MOVE_DATA.
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS: <fs> type any.
    *--- Sorting the internal table
    SORT IT_INTERN BY ROW COL.
    CLEAR IT_INTERN.
    LOOP AT IT_INTERN.
    MOVE IT_INTERN-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <fs>.
    *--- Asigning the field value to a field symbol
    <fs> = it_intern-value.
    *MOVE IT_INTERN-VALUE TO <fs>.
    AT END OF ROW.
    APPEND IT_DATA.
    CLEAR IT_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM. " MOVE_DATA
    *& Form DELETE_HEADER_EMPTY_RECS
    * To delete the Header and empty records
    FORM DELETE_HEADER_EMPTY_RECS.
    DATA: LV_TABIX LIKE SY-TABIX.
    IF NOT P_HEADER IS INITIAL.
    LOOP AT IT_DATA.
    IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
    DELETE IT_DATA FROM 1 TO P_HEADER.
    * P_HEADER = 0.
    EXIT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    CLEAR IT_DATA.
    *--- To delete the empty lines from internal table
    LOOP AT IT_DATA.
    LV_TABIX = SY-TABIX.
    IF IT_DATA IS INITIAL.
    V_EMPTY = V_EMPTY + 1.
    DELETE IT_DATA INDEX LV_TABIX..
    ENDIF.
    ENDLOOP.
    CLEAR IT_DATA.
    *--- Total no of recs in file
    DESCRIBE TABLE IT_DATA LINES V_TOTAL.
    IF V_TOTAL = 0.
    *MESSAGE I013" No records in the file
    F_STOP = 'X'.
    STOP.
    ENDIF.
    ENDFORM. " DELETE_HEADER_EMPTY_RECS
    *& Form UPLOAD_MATMAS
    * to upload Material Master data
    FORM UPLOAD_MATMAS .
    LOOP AT IT_DATA.
    * Header
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
      EXPORTING
        input              = it_data-matnr
    IMPORTING
       OUTPUT             =  it_data-sapmatnr
    EXCEPTIONS
       LENGTH_ERROR       = 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.
    BAPI_HEAD-MATERIAL = IT_DATA-sapMATNR.
    BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
    BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
    BAPI_HEAD-BASIC_VIEW = 'X'.
    BAPI_HEAD-PURCHASE_VIEW = 'X'.
    BAPI_HEAD-ACCOUNT_VIEW = 'X'.
    BAPI_HEAD-SALES_VIEW = 'X'.
    BAPI_HEAD-QUALITY_VIEW = 'X'.
    * Material Description
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = IT_DATA-SPRAS.
    IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
    APPEND IT_MAKT.
    * Client Data - Basic
    BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
    BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
    BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
    BAPI_MARA1-DIVISION = IT_DATA-SPART.
    BAPI_MARA1-item_cat = it_data-mtpos_mara.
    BAPI_MARA1-PROD_HIER = it_data-prdha.
    bapi_marax-item_cat = 'X'.
    bapi_marax-prod_hier = 'X'.
    BAPI_MARAX-MATL_GROUP = 'X'.
    BAPI_MARAX-BASE_UOM = 'X'.
    BAPI_MARAX-UNIT_OF_WT = 'X'.
    BAPI_MARAX-DIVISION = 'X'.
    * Plant - Purchasing
    BAPI_MARC1-PLANT = IT_DATA-WERKS.
    BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
    BAPI_MARC1-LOADINGGRP = IT_DATA-LADGR.
    BAPI_MARC1-PROFIT_CTR = IT_DATA-prctr.
    BAPI_MARC1-BATCH_MGMT = IT_DATA-xchpf.
    bapi_marc1-qm_authgrp = 'X'.
    bapi_marcx-qm_authgrp = 'X'.
    BAPI_MARCX-PLANT = IT_DATA-WERKS.
    BAPI_MARCX-PUR_GROUP = 'X'.
    BAPI_MARCX-LOADINGGRP = 'X'.
    BAPI_MARCX-PROFIT_CTR = 'X'.
    BAPI_MARCX-BATCH_MGMT = 'X'.
    * Accounting
    BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
    BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
    BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
    BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
    BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
    BAPI_MBEWX-PRICE_CTRL = 'X'.
    BAPI_MBEWX-STD_PRICE = 'X'.
    BAPI_MBEWX-PRICE_UNIT = 'X'.
    * Sales Data
    BAPI_MVKE1-ITEM_CAT = IT_DATA-MTPOS_MARA.
    BAPI_MVKEX-ITEM_CAT = 'X'.
    BAPI_MVKE1-SALES_ORG = IT_DATA-vkorg.
    BAPI_MVKEX-SALES_ORG = IT_DATA-vkorg.
    BAPI_MVKE1-DISTR_CHAN = IT_DATA-vtweg.
    BAPI_MVKEX-DISTR_CHAN = IT_DATA-vtweg.
    BAPI_MVKE1-MAT_PR_GRP = IT_DATA-kondm.
    BAPI_MVKEX-MAT_PR_GRP = 'X'.
    BAPI_MVKE1-ACCT_ASSGT = IT_DATA-ktgrm.
    BAPI_MVKEX-ACCT_ASSGT = 'X'.
    BAPI_MVKE1-MATL_GRP_1 = IT_DATA-mvgr1.
    BAPI_MVKEX-MATL_GRP_1 = 'X'.
    BAPI_MVKE1-MATL_GRP_2 = IT_DATA-mvgr2.
    BAPI_MVKEX-MATL_GRP_2 = 'X'.
    BAPI_MVKE1-MATL_GRP_3 = IT_DATA-mvgr3.
    BAPI_MVKEX-MATL_GRP_3 = 'X'.
    BAPI_MVKE1-matl_stats = IT_DATA-versg.
    BAPI_MVKEX-matl_stats = 'X'.
    *--- BAPI to create material
    call function 'BAPI_MATERIAL_SAVEDATA'
    exporting
    HEADDATA = BAPI_HEAD
    CLIENTDATA = BAPI_MARA1
    CLIENTDATAX = BAPI_MARAX
    PLANTDATA = BAPI_MARC1
    PLANTDATAX = BAPI_MARCX
    SALESDATA = BAPI_MVKE1
    SALESDATAX = BAPI_MVKEX
    IMPORTING
    RETURN = BAPI_RETURN
    TABLES
    MATERIALDESCRIPTION = IT_MAKT
    IF BAPI_RETURN-TYPE = 'E'.
    WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,it_data-matnr.
    ELSEIF BAPI_RETURN-TYPE = 'S'.
    WRITE: 'Successfully created/Changed material' ,it_data-matnr.
          CLEAR return.
          REFRESH return.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
               IMPORTING
                    return = return.
    ENDIF.
    ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS
    Regards
    Raju Chitale

  • Dynamic Selection screen in FDK43 transaction

    HI,
    The transaction FDK43 has a dynamic selection screen used from LDB DDF .It does not show all selections views in the dynamic selection but when I test the LDB from se36 its shows all the selections in dynamic selections.
    Any idea why it is not showind in the transaction FDK43 ??
    Regards,
    Shital

    Hi,
    LDB fields are nothing to do with Dynamic Selection. It is not necessary that all the field of LDB should be visible in Dynamic Selection. FDK43 is a standard screen and SAP has designed the dynamic selection with limited option. If you want additional fields, you need to do the enhancement with the help of ABAPer.
    Regards,
    Ravi

  • Additional Dynamic Selection criteria for Vendor-Search Tearm 2

    Hi All,
    I need to incorporate additional dynamic selection criteria which references 'Vendor-Search Term 2' in new Z Transaction which is a copy of Transaction S_ALR_87012086.
    help me out how to proceed.
    Full reword points will be given.

    Hello Chetan,
    have you checked note 79166 "MM-SRV Hint: Vendor evaluation for service"?
    Define an evaluation criterion for services in Customizing of the vendor evaluation to be able to use the vendor evaluation also for the services management.The main criterion must contain the determination methods 'C' (determination from the quality valuation of the service) and 'D' (determination from the timeliness rating of the service) in the sub-criteria.
    Kind Regards
    TomT

  • Dynamic Select in FOR REC IN (SELECT

    Hello Guys,
    We are trying to use dynamic select statement in FOR REC IN based on certain parameter. But does not compile with following error message.
    209/10 PLS-00103: Encountered the symbol "END" when expecting one of the following:
    loop
    Could some one let us know how this can be achieved, may be with an example. Thankis in advance. Here is the sample code:
    IF pPROCESS_BY = 'ALL' THEN
    FOR REC IN (SELECT LSP.HAZMNP_SEQ_NO,
    LSP.LSP_START_DATE,
    LSP.LSP_END_DATE,
    LSP.LSP_OST,
    LSP.LSP_DBI,
    LSP.LSP_DBI_FREQUENCY_PERIIOD,
    LSP.LSP_DBI_RETENTION_PERIOD,
    LSP.LSP_DBI_RETENTION_FREQUENCY,
    LSP.LSP_ENDURANCE_LEVEL,
    LSP.LSP_RDE_PERIOD1,
    LSP.LSP_RDE_PERIOD2,
    LSP.LSP_RDE_PERIOD3,
    LSP.LSP_RDE_PERIOD4,
    LSP.LSP_EXCLUDED_ACTIVITIES,
    LSP.LSP_SEQ_NO
    FROM LEVEL_SET_PARAM LSP
    WHERE LSP.LSP_PROCESS_ALL_NIINS = 'Y'
    AND LSP.LSP_IS_ALL_NIINS_PROCESSED = 'N'
    AND LSP.HAZMNP_SEQ_NO = pHAZMINSEQNO
    AND ROWNUM = 1
    ORDER BY LSP_SEQ_NO DESC)
    END IF;
    IF pPROCESS_BY = 'SPN' THEN
    FOR REC IN (SELECT LSP.HAZMNP_SEQ_NO,
    LSP.LSP_START_DATE,
    LSP.LSP_END_DATE,
    LSP.LSP_OST,
    LSP.LSP_DBI,
    LSP.LSP_DBI_FREQUENCY_PERIIOD,
    LSP.LSP_DBI_RETENTION_PERIOD,
    LSP.LSP_DBI_RETENTION_FREQUENCY,
    LSP.LSP_ENDURANCE_LEVEL,
    LSP.LSP_RDE_PERIOD1,
    LSP.LSP_RDE_PERIOD2,
    LSP.LSP_RDE_PERIOD3,
    LSP.LSP_RDE_PERIOD4,
    LSP.LSP_EXCLUDED_ACTIVITIES,
    LSP.LSP_SEQ_NO
    FROM LEVEL_SET_PARAM LSP
    WHERE LSP.HAZMNP_SEQ_NO = pHAZMINSEQNO
    AND LSP.LSP_SPECIFIC_NIIN = pSPECIFIC_NIIN
    AND ROWNUM = 1
    ORDER BY LSP_SEQ_NO DESC)
    END IF;
    LOOP

    You need to use cursor variables if you want to process result sets based on different query statements.
    For more information and a sample see
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/06_ora.htm#1510

Maybe you are looking for

  • How to get number of pages uisng cl_gui_alv_grid

    Dear all, my requirement is iam creating PO based on vendor and material grade,suppose if my vendor has 100 line items i should display all those line items into 5 pages.iam using set table for first display method to display Itab.iam using Module po

  • Is it possible to a make a semi-pie chart in Keynote???

    I'm working on a documentary film about Germany in the early thirties. And to show the NSDAP share of parliamentary seats in the last election (March 1933), I was hoping to use a semi-pie rather than a full circle or full pie. Since the semi-pie is s

  • SQL Issue Access Violation at address 09513DC9

    Access violation at address 09513DC9 in module 'WDBHandler.dll'. Write of address 00000000

  • C410a won't always scan - says other devices are using scanner

    Often when I put a document in the scanner and then on the software click 'scan' I get an error message that says "The scan cannot be performed because another program or computer is using the networked HP imaging device.  Try again later."  And the

  • Security code in c6-01

    can i use security code and figer print reader in nokia c6-01 Solved! Go to Solution.