How to create an own dropdown function in the ALV toolbar?

Dear experts,
I follow the sap.help.com and try to create a dropdow as an own fucntion the the toolbar of an ALV.
My codes are as following:
DATA:  lo_dropdown TYPE REF TO CL_SALV_WD_FE_DROPDOWN_BY_IDX,
            lo_dropdown_func  TYPE REF TO CL_SALV_WD_FUNCTION
            lo_value  TYPE REF TO  CL_SALV_WD_CONFIG_TABLE.
lo_value = ir_interface_controller->get_model( ).
CREATE OBJECT lo_dropdown EXPORTING texts_elementname = 'DROPDOWN'.
lo_dropdown_func = lo_value->if_salv_wd_function_settings~create_function( id = 'DROPDOWN' ).
lo_dropdown_func->set_editor(  lo_dropdown ).
lo_dropdown->set_enabled.
I also set an external Context-Mapping to the Context-node FUNCTION_ELEMENTS of ALV-Interfacecontroller.
But now I get an error message "The ASSERT condition was violated"
The error position has the following code and comments:
" Context Path contains no multiple node
     assert 1 = 2
Could you please tell me, how could I fix this bug?
Thanks a lot!
Regards,
meer

>** " Context Path contains no multiple node
From this statement I'm guessing that the context node that the DropDownByIndex editor is bound to isn't a multiple node (1:n or 0:n).  A byIndex gets its allowed values in the drop down from the elements in a context node. Therefore it doesn't make sense to bind a byIndex to a 0:1 or 1:1 context node.

Similar Messages

  • How to create a JSP dropdown list in the latest Early release

    Hello:
    this is probably an easy question. I am trying to create a dropdown list in a JSP form from a data control like "employee id". just dragging the data control attribute does not seem to have any effect in showing the drop down list when the JSP page is run.
    What is the missing factor?
    Thanks in advance for the help.

    Please ask this in the JHeadstart forum
    Timo

  • How to add a dropdown box in an ALV  toolbar??

    hi,
       i have a requirement where i need to add a dropdown box in my ALV Toolbar. To be precise next to the export button in my ALV.
    Plz help me on this, thanks.

    Hi Frank,
    I am providing the some peice of code which will be helpful to you.
    Adding the DropDown list to the ALV toolbar:
    lr_functions ?= wd_this->r_table.
    lr_function = lr_functions->create_function( 'MYDROPDOWNBYINDEX' ).
    create object lr_dropdown_by_idx
    exporting
    texts_elementname = 'DROPDOWNBYINDEX.VALUE'.
    lr_dropdown_by_idx->set_label_text( 'MYDROPDOWNBYINDEX' ).
    lr_function->set_editor( lr_dropdown_by_idx ).
    Providing the values to that DropDown:
    Here in my example DROPDOWNBYINDEX.VALUE is the context attrubute. And i write the Supply function for that node as follows:
    data:
    lt_dropdownbyindex type if_componentcontroller=>elements_dropdownbyindex,
    ls_dropdownbyindex type if_componentcontroller=>element_dropdownbyindex.
    ls_dropdownbyindex-value = 'Nothing'. "#EC NOTEXT
    append ls_dropdownbyindex to lt_dropdownbyindex.
    ls_dropdownbyindex-value = 'ActionDropdownByIndex'. "#EC NOTEXT
    append ls_dropdownbyindex to lt_dropdownbyindex.
    node->bind_table( lt_dropdownbyindex ).
    For reference you can refer the WD component SALV_WD_TEST_TABLE_TOOLBR which holds the same code
    Hope this will help you. Reward points if it helps.
    Cheers,
    Darshna.

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

  • How to Create a Remotely Enabled Function Module

    Hi All,
    How to Create a Remotely Enabled Function Module.
    I Want to Create a FM Using Sample Data , This for Practice
    What Fields can i give in the Import and Export Parameters.
    Please Give me one Example
    Can Any one Give me the Steps to do this.
    Regards
    Vamsi

    Hi Vamsi,
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
      exporting
        p_num1 = 10
        p_num2 = 15
      importing
        p_tot = tot.
    write tot.
    please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    Regards,
    Sukhee

  • How to create 2/3 dropdown lists

    How to create 2/3 dropdown lists that are linked.  The first one answered drives the answer for the second or thrid dropdown box.
    Also can I wrap text in a dropdown list?
    Thanks in advance.

    This is the scripting I tried to use  in the first dropdown list and it doesn't work, any HELP would be appreciated.
    form1.#subform[0].DropDownList1::exit - (JavaScript, client)
    if(this.rawValue=="a")
    DropDownList2a.presence = "visible";
    DropDownList2b.presence = "hidden";
    DropDownList2c.presence = "hidden";
    else if (this.rawValue == "b")
    DropDownList2a.presence = "hidden";
    DropDownList2b.presence = "visible";
    DropDownList2c.presence = "hidden";
    else if (this.rawValue == "c")
    DropDownList2a.presence = "hidden";
    DropDownList2b.presence = "hidden";
    DropDownList2c.presence = "visible";
    Thanks in advance

  • How to Create one more SOA-INFRA under the same domain in weblogic server

    Hi All,
    Can anybody can guide how to create one more soa-infra under the same domain. In order to maintain my composites to be deployed into
    different domains, I need to create one more soa-infra and deployed all the composites under that one.
    Please let me know if any demo is available for this activity to be gets completed.
    Regards,
    CH

    Hi Vijay,
    There are several composites which needs to be deployed and maintained in the server. So, we I'm trying to maintian
    by deploying composites into 3 different SOA-INFRA's so if one is not accessible, we can look into it and others can access the
    composites from another SOA-INFRA instead of creating domains.
    Let me know what will be feasible way to perform this activity.
    Regards,
    CH

  • How to deploy my own web services to the Start BPEL PM Server?

    Recently, I am learning the JDeveloper BPEL Designer(version 10.1.2.0), I had finished my first BPEL process CreditFlow flowing the quickstart guider.
    Now I wonder how to deploy my own web services to the Start BPEL PM Server? I mean I don't want to invoke the CreditRatingService as I did flowing the quickstart guider, but to invoke my own web servcies. Now I had made some web services with eclipse and deployed them to the tomcat5.0. but how can I invoke these my own web services just like I invoked the CreditRatingService in the JDeveloper BPEL Designer?
    Thank you!

    Copy the WSDL file from your Tomcat server onto your development machine. Add them to your project in JDeveloper. Then add a partnerlink and specify the WSDL location. Then add you role, variables and compile!

  • How to create a form that will allow the applicant to upload their photo

    I have Adobe Acrobat 9 Pro Extended and I know how to create forms that require text input.
    How to create a form that will allow the applicant to upload their photo? I alo wish to know how to upload a photograph so that I can test the form I created.
    Thank you
    Adrian Watts

    test@ORA10G> with x as (
      2    select '234-1111' as customer, to_date('2-Jan-2008','dd-Mon-yyyy') as call_date, 'Order product' as reason from dual union all
      3    select '234-1132', to_date('3-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      4    select '231-1154', to_date('4-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      5    select '234-1111', to_date('2-Nov-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      6    select '234-1132', to_date('9-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      7    select '231-1154', to_date('9-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      8    select '234-1111', to_date('5-Dec-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      9    select '234-1131', to_date('7-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    10    select '231-1154', to_date('1-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    11    select '234-1111', to_date('8-Jan-2008','dd-Mon-yyyy'), 'Order product' from dual union all
    12    select '234-1131', to_date('3-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    13    select '231-1154', to_date('4-Nov-2007','dd-Mon-yyyy'), 'Forward to Sales' from dual)
    14  --
    15  select customer,max(call_date), reason
    16  from x
    17  where reason = 'Request info'
    18  group by customer, reason;
    CUSTOMER MAX(CALL_ REASON
    231-1154 09-SEP-07 Request info
    234-1131 07-DEC-07 Request info
    234-1132 09-JAN-08 Request info
    test@ORA10G>
    test@ORA10G>pratz

  • How to create my own Apple ID and delete the old Apple ID .

    Hello please can anyone help me I recently brought the imac 27 is x maverick desktop. I had brought this imac from someone who no longer wanted it. My problem is I have managed to log on with my Apple ID . But when I go into my purchases of my apps it's saying its empty and I don't know how I create the imac to my Apple ID . I do have the old information of the person I brought it off the id and password but I don't know how to delete the old and create my own please if anyone can help and advice I would be really grateful thanks for your time and advice.

    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    From Here   http://support.apple.com/kb/HE37

  • How to create a dependant dropdown list in JHeadStart

    I have created a JDeveloper application using JHeadStart. I have created a dropdown list that should be dependant on another value in the table.
    So far I have done the following:
    1. Created a new view object in the data model.
    2. Created a bind variable to supply the value to the where clause for the view.
    3. Altered the where clause in the view to use the bind variable.
    4. Created a new domain in JHeadStart using this new view.
    Where I am having problems is how to assign the bind variable the value of another field in the currently displayed form. The current form is in form layout mode.
    I have done this when using table layout mode by doing the following: bindvariable=#{row.field} which works great. The problem is how do I do this in form layout?

    Please ask this in the JHeadstart forum
    Timo

  • ActionsScript 3 how to create on key down function?

    Ok so I understand that you make an event listener and an
    event handler, but I do not understand how to create a function
    were I can hold down a key and the object keeps moving until the
    key is up.
    With the following function it only moves it every time I
    press a certain key. I need to move while the key is held down
    until released. I looked around with google and couldn't really
    find anything other than how to do this in AS2, which isn't
    helpful. Please help! :D
    stage.addEventListener(KeyboardEvent.KEY_DOWN, jumpEvent);
    private function jumpEvent(event:KeyboardEvent):void
    if(event.keyCode == 17)
    nissanZ.x += 10;

    hey thanks a bunch vario pegged!
    its working pretty well :D

  • How to create a user_defined grouping function?

    I need to create a user_defined function and use it in my sql statement.
    I know the user_defined function can be used anywhere the build-in function can be used.In oracle,there are grouping functions.
    How can I create a user_defined grouping function and I can use it in my sql statement.

    Hi, can you explain exactly what you are trying to achieve:
    SQL> create or replace function my_func return number as
      2  begin
      3    return 5;
      4  end;
      5  /
    Function created.
    SQL> select deptno,my_func(),max(sal)
      2  from emp
      3  group by deptno,my_func()
      4  /
        DEPTNO  MY_FUNC()   MAX(SAL)
            10          5       5000
            20          5       3000
            30          5       2850

  • How to create our own XML Schema (.xsd) in Weblogic WorkShop

    Hi,
    I am new to Weblogic Workshop.I want to create one xml schema with custom elements.
    when I am creating a file xml schema(.xsd).The file contains default namespace and no child elements in it.I don't know how to add elements to that file.
    please tell me how to add parent elements and child elements and also our own xml namingspace.

    Hi Sivaram,
    Unfortunately, the 8.1 IDE did not have special tooling for schema generation.
    You will need to create it by hand or using an external tool
    If you are using an external tool to create the file within the schema project, you might want to disable the schema project auto build, which will be triggered every time a file save takes place
    cheers
    Raj

  • How to create material(mm01)  through function module or bapi

    Hi,
        this is kiran iam sap fresher.

    Hi,
    try this
    *& Report ZKAR_MATMAS_BAPI
    *& This program demonstrates how easy it is to create Material master
    *& data using BAPI_MATERIAL_SAVEDATA
    *& The program also generates a report post-execution displaying errors
    *& as well as successful uploads
    REPORT ZKAR_MATMAS_BAPI.
    * TABLES
    * 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_RETURN LIKE BAPIRET2. " Return Parameter
    *--- 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
                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
    'C:\Material_master.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'
        CHANGING
          FILE_NAME     = F_FILE
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
      ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    * text
    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>.
    *--- 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
        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(ZLKPL_MSGCLASS). " 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
        UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
        BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
        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'.
    * 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_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_MARCX-PLANT = IT_DATA-WERKS.
        BAPI_MARCX-PUR_GROUP = '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'.
    *--- 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
    * FORECASTPARAMETERS =
    * FORECASTPARAMETERSX =
    * PLANNINGDATA =
    * PLANNINGDATAX =
    * STORAGELOCATIONDATA =
    * STORAGELOCATIONDATAX =
    * VALUATIONDATA = BAPI_MBEW1
    * VALUATIONDATAX = BAPI_MBEWX
    * WAREHOUSENUMBERDATA =
    * WAREHOUSENUMBERDATAX =
    * SALESDATA = BAPI_MVKE1
    * SALESDATAX = BAPI_MVKEX
    * STORAGETYPEDATA =
    * STORAGETYPEDATAX =
        IMPORTING
        RETURN = BAPI_RETURN
        TABLES
        MATERIALDESCRIPTION = IT_MAKT
    * UNITSOFMEASURE =
    * UNITSOFMEASUREX =
    * INTERNATIONALARTNOS =
    * MATERIALLONGTEXT =
    * TAXCLASSIFICATIONS =
    * RETURNMESSAGES =
    * PRTDATA =
    * PRTDATAX =
    * EXTENSIONIN =
    * EXTENSIONINX =
        IF BAPI_RETURN-TYPE = 'E'.
          WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-MATNR.
        ELSEIF BAPI_RETURN-TYPE = 'S'.
          WRITE: 'Successfully created material' ,IT_DATA-MATNR.
        ENDIF.
      ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS

Maybe you are looking for