BAPI_Material_get_Detail  Function Module Error in WEBDYNPRO application

Hi All,
I am trying to get the material info from SAP by webDynPro.
My Input Parameter is Material(IMPORT PARAMETER) and out put is Matrial_general_data(EXPORT PARAMETER).
In the implementation of method in
wdDoInit().
Bapi_Material_Get_Detail_Input input = new Bapi_Material_Get_Detail_Input();
    wdContext.nodeBapi_Material_Get_Detail_Input().bind(input);
what is the object I have to initiate for material Parameter.
//for input data Material     
    Matnr bapimat = new Matnr();
I tried in different way I am getting error.
Thanks & Regards,
Ram

Hi Ram,
looking at the corresponding XML interface specification at <a href="http://ifr.sap.com/catalog/query.asp">the SAP interface repository</a> there are only simple import parameters for Material.GetDetail. According to Web Dynpro model creation conventions, you should be able to set the parameters directly in the Bapi_Material_Get_Detail_Input instance like:
Bapi_Material_Get_Detail_Input input = new Bapi_Material_Get_Detail_Input();
wdContext.nodeBapi_Material_Get_Detail_Input().bind(input);
input.setPlant("yourPlant");
input.setValuationArea(...);
Hope that helps.
Regards
Stefan

Similar Messages

  • Can I execute a function module in my  Webdynpro App ?

    Hi,
    Can I execute a function module in my Webdynpro App ?  I mean, it's not a BAPI.
    Is it possible ?   which is the procedure to follow ?  (comparing to a bapi procedure).
    Thanks for your help !
    Regards from Mexico.  =)
    Diego

    Hi Diego,
    the warning icon indicates that you're using a function module that has not been externally released. If the corresponding function module has been defined by SAP, its interface might be changed in an incompatible way within one of the next releases, e.g. removing / renaming a parameter or structure field. Stability is only guaranteed for BAPIs or external released function modules.
    From the point of view of the model import it does not make any difference. If import does not work, there seems to be some other problem. Maybe the function module has not been activated in the R/3 system. Or check the log file or the import log page which will be the last page of the import wizard.
    You might want to import some other none external released function module in order to verify that model import of these kind of function module works.
    Kind regards,
    Lothar Bender

  • Error in WebDynpro Application in accessing "MIME Repository"

    Hi All,
    I am writing a XML file to Mime Repository from WebDynpro Application.
    To do this, I developed the below code:
      DATA mime_repository TYPE REF TO if_mr_api.
      DATA url TYPE string VALUE
    '/SAP/BC/WebDynpro/SAP/PUBLIC/BC/SSR/uuielibs/example.xml'.
      mime_repository = cl_mime_repository_api=>get_api( ).
      CALL METHOD mime_repository->put
        EXPORTING
          i_url                     = url
          i_content                 = content
          i_suppress_package_dialog = 'X'.
    In execution process,I am getting an error,
    "Screen output without connection to user" and "DYNPRO_SEND_IN_BACKGROUND"
    In calling the method IF_MR_API~PUT, I have passed "X" to I_SUPPRESS_PACKAGE_DIALOG to avoid Transport Request screen.
    Can you please suugest how can I overcoem this issue.

    Leha,
    Is this RFC expecting any mandatory parameters ? if that is the case make sure that you are sending the expected type mandatory parameter.  (you can print a message on the screen and verify this)
    If you are sure that you are sending the correct details to execute RFC, Please turn on the debiug session for the portal user in the backend and see whether the values are passing from the portal or not.
    How to switch on Debug mode in the backend for the specific user:
    Requirements:
    1. Make sure the user id existed in Portal and SAP Backend.
    2. Setup the debug mode for the user in the backend
    3. Run the application from the portal
    4. While executing the application from the portal , The backend stops the execution to debug, so from here you have to execute the FM step by step and verify whether you are getting the values from the portal or not.
    Steps to switch on Debug mode in the backend:
    Logon to ECC System>> To access the function module use SE37 tcode from the SAP Easy access menu>>Enter the Function Module name and click on Display>>From the SAP Menu click on Utilities>>Settings >>Debugging >>Enter the user ID to switch on the debug mode and Enter.
    Now the user ID is switched on for Debug. Go to the Function module Source Code>> palce the cursor at the start of the soruce code>>From the Menu go to Utilities>>BreakPoint>>Set?Delete Break Point
    This will set the break point for the mentioned user id and now you can veryfy the values on the backend.
    Once you complete the debug process please turnoff the debug mode.
    Thanks
    Krishna

  • Error in webdynpro application using RFC's

    Hii,
    I have a webdynpro application where i use RFC to add a new customer to the database.I have used datacust and Uicust to do the corresponding coding.While running the application, values are not getting added from the front-end...giving an error "Error in adding customer".While i execute the RFC at R3 and enter new customer values,values are getting saved successfully.
    I am not getting to solve the problem.Please do help out.
    Thanks,
    Parama.

    Leha,
    Is this RFC expecting any mandatory parameters ? if that is the case make sure that you are sending the expected type mandatory parameter.  (you can print a message on the screen and verify this)
    If you are sure that you are sending the correct details to execute RFC, Please turn on the debiug session for the portal user in the backend and see whether the values are passing from the portal or not.
    How to switch on Debug mode in the backend for the specific user:
    Requirements:
    1. Make sure the user id existed in Portal and SAP Backend.
    2. Setup the debug mode for the user in the backend
    3. Run the application from the portal
    4. While executing the application from the portal , The backend stops the execution to debug, so from here you have to execute the FM step by step and verify whether you are getting the values from the portal or not.
    Steps to switch on Debug mode in the backend:
    Logon to ECC System>> To access the function module use SE37 tcode from the SAP Easy access menu>>Enter the Function Module name and click on Display>>From the SAP Menu click on Utilities>>Settings >>Debugging >>Enter the user ID to switch on the debug mode and Enter.
    Now the user ID is switched on for Debug. Go to the Function module Source Code>> palce the cursor at the start of the soruce code>>From the Menu go to Utilities>>BreakPoint>>Set?Delete Break Point
    This will set the break point for the mentioned user id and now you can veryfy the values on the backend.
    Once you complete the debug process please turnoff the debug mode.
    Thanks
    Krishna

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • Function Module error in query execution

    Hi SDN Gurus,
    When I run this query in Dev it gives me an error: "Function Module RSD_ZK_ACCT_TEXT_GET does not exist." When I look up in SE37 in both DEV and QAS, there is no such function module though I don't get this message in QAS.
    ZK_ACCT is one of our important infoobjects and is in the query.
    Thanks for your help.
    SAF

    Hi Saf,
    Try with Tcode RSRT and with the following option:
    Buttom:Genrate Report.
    Menù: Repair.
    And then execute once again the report.
    Ciao.
    Riccardo.

  • ABAP Function Module Error

    Hello,
    In one of my function modules, I have the code as shown below. I got an error after executing this code. The error is:
    In LOOP .... WHERE... the line type of the table must be statically defined.
    <b>This error is for the highlighted LOOP statement.</b> Could someone please help me with the code.
    <b>Objective of the function module:</b> I have a hashed table with some records.
    Eg: CCTR      FISCPER           VERSION  AMOUNT
          100          06/2007                10              100
           100         06/2007                 20              0
           100        07/2007                 10                45
    I want to update the amount for version '20' (for same costcenter and same period as of version 10) by doing some calculations.
    FUNCTION YCALC_VALUE.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
    FIELD-SYMBOLS: <xth_data>     TYPE HASHED TABLE,
                     <ls_data>      TYPE /1SEM/_YT_DATA_100KMPA,
                     <l_chavl>      TYPE ANY,
    field symbols for fields of <ls_data>
                      <ls_chas>     TYPE /1SEM/_YT_CHAS_100KMPA,
                      <ls_nchas>    TYPE /1SEM/_YT_CHAS_100KMPA,
                      <ls_kyfs>     TYPE /1SEM/_YT_KYFS_100KMPA,
                      <ls_nkyfs>    TYPE /1SEM/_YT_KYFS_100KMPA,
    LOOP AT xth_data ASSIGNING <ls_data>.
        ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_chas>.
        ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_kyfs>.
      ......There are some calculations................................
    ENDLOOP.
      LOOP AT xth_data INTO <ls_data>.
        ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <ls_data> TO <ls_nchas>.
        ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <ls_data> TO <ls_nkyfs>.
    IF ( <ls_data>-S_CHAS-0fiscper = '006' ) AND (<ls_data>-S_CHAS-0version='10' ).
            tempcctr = <ls_data>-S_CHAS-0costctr.
            tempperiod   = <ls_data>-S_CHAS-0fiscper.
            tempamount   = <ls_data>-S_KYFS-0amount.
           <b> LOOP AT XTH_DATA INTO <ls_nchas>
              WHERE 0costctr = tempcostctr
                AND 0fiscper  = tempperiod
                AND 0version   = '20'.</b>
                <ls_nchas>-S_KYFS-0amount = ( tempamount * 100 ) + 500.
                MODIFY xth_data FROM <ls_nchas>.
            ENDLOOP.
    ENDFUNCTION.
    Thank You.
    Message was edited by:
            George Smith
    Message was edited by:
            George Smith

    Hi George..
    Declare the Field symbol with the Same line type of the Internal table which is passed to the FM.
    Eg:
    <b>Field-symbols : <ls_data> like Line of XTH_Data.
    Loop at XTH_Data ASSIGNING <LS_DATA>.</b>
    Then it should work...

  • Regarding the function module --error is coming.

    Hi All
    I am executing function module and i am getting one error after actvating that FM.
    Error is - REPORT/PROGRAM statement missing, or program type is I (INCLUDE).          
    Waiting for the fovarable reply.

    Hi,
    While creating a FM you will be assigned to a Function Group, that Function Group is not active. If function group is not active then only you will be getting this error.
    To over come this issue. Please do the below process.
    Go to Se80--> Select Function Group from the drop down list --> Select the function group --> Right click on the Function group --> Select activate.
    After above process is completed.
    Test the Function Module.
    Thanks,
    Sriram Ponna.

  • Function module error message.

    Call Function ‘Z_function’.
    Imports
    Exports
    EXCEPTIONS
      no_entry_found       = 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.
    Suppose
    if sy-subrc =  1.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Giving me popup and is troubling.
    Could you please tell me if I comment below
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4....
    and proceed will it effect me in case of sy-subrc <> 0.
    Thank you

    Hi Sam,
    Yes you can. But some times the programs emphasises specific program errors.
    For e.g.
    Use the following code for function module for GENEREIC case.
    In this case you can remove total piece of code suggested by you. and replace the following  code.
    If sy-subrc ne 0.
    Messae 'Error in function module' Type 'E'.
    Endif.
    Use the following code for function module for SPECIFIC case.
    case sy-subrc.
    when '1'.
       Message 'No_entry found' type 'E'.
    when '2'.
       Message 'Undetermined error in Function module. Please contact system administrator' Type 'E".
    Endcase.
    Regards
    Bhupal Reddy

  • Regarding function module error

    hi experts,
                 i m using hr_infotype_operation....the syntax is like this..
    loop at info_table.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY                  = '0015'
        NUMBER                 = info_table-pernr
       SUBTYPE                 = '6500'
      OBJECTID               =
      LOCKINDICATOR          =
       VALIDITYEND             = jtab-begda
       VALIDITYBEGIN           = jtab-endda
      RECORDNUMBER           =
        RECORD                 = info_table
        OPERATION              = 'INS'
      TCLAS                  = 'A'
      DIALOG_MODE            = '0'
      NOCOMMIT                = NOCOMMIT
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = W_RETURN.
      KEY                    = PERSONALDATAKEY.
    endloop.
    but it is giving this error:::
    ShrtText
        Error in ASSIGN in the program "SAPLHRMM".
    What happened?
        Error in ABAP application program.
        The current ABAP program "SAPLHRMM" had to be terminated because one of the
        statements could not be executed.
        This is probably due to an error in the ABAP program.
    Error analysis
        The source field is too short.
        The current program, "SAPLHRMM", tried to assign a field to a field symbol.
        However, the field is shorter than the type of the field symbol, which
        is not allowed.
        The statement in question is in the form ASSIGN f TO <fs> CASTING or
        ASSIGN f TO <fs> with a field symbol that was created using the
        STRUCTURE addition.
    plz help me to solve this problemmmmm

    check this piece of code
    Perform PA30 via infotype_operation
          call function 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty         = '0009'
              number        = p0009-pernr
              validityend   = p0009-endda
              validitybegin = p0009-begda
              subtype       = p0009-subty
              recordnumber  = p0009-seqnr
              record        = p0009
              operation     = 'MOD'
              dialog_mode   = '1'
            IMPORTING
              return        = l_return.
    the data type should be same as the one's paased in the above case.
    Reward points if helpful

  • How to remove function module error?

    Hi Iam using a FM to get the database value of project name(PROJ-PSPID),Iam using this in my module pool program,when I enter wrong project name,the FM itself throwing the error,I want my own error message rather FM error message.How to achieve it?
    Thanks in advance.

    Hi Rock,
    After executing the function module , check for sy-subrc value as shown below
    data: w_return type bapiret2,
            it_return type table of bapiret2.
    call function '.....'
    IF SY-SUBRC EQ 0.
        PERFORM fm_update_return_msg
                      USING  'E'
                             your Message class
                             'msg no'
                      CHANGING w_return.
          APPEND w_return TO IT_RETURN.
          clear w_return.
       ENDIF.
    FORM fm_update_return_msg  USING    p_msgty  TYPE sy-msgty
                                        p_msgid  TYPE sy-msgid
                                        p_msgno  TYPE sy-msgno
                                        p_msg_v1 TYPE sy-msgv1
                                        p_msg_v2 TYPE sy-msgv2
                                        p_msg_v3 TYPE sy-msgv3
                                        p_msg_v4 TYPE sy-msgv4
                               CHANGING p_return TYPE bapiret2.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
        EXPORTING
          type   = p_msgty
          cl     = p_msgid
          number = p_msgno
          par1   = p_msg_v1
          par2   = p_msg_v2
          par3   = p_msg_v3
          par4   = p_msg_v4
        IMPORTING
          return = p_return.
    ENDFORM.                    "fm_update_return_msg

  • Heapdump error in WebDynPro application

    Hi All,
    I’ve developed webdynpro application involves calling RFCs…etc.While executing the application it’s giving heapdump on server.
    Please any one of you suggest why I am getting such heapdump  and when we will get heapdump errors?
    Thanks in advance.
    ~Adams

    Hi Adam,
              You might be getting heap size error because at the server the heap size declared is less or the server cache memory is geting filled.
    Re: Problem in Starting the J2EE Server
    java.lang.OutOfMemoryError: Java heap space
    Check above link.
    Regards,
    Vaibhav

  • Function Module Error: GETWA_NOT_ASSIGNED

    Hello everyone,
    I have a scenario where I copy a function module (IDOC_INPUT_ORDERS to ZIDOC_INPUT_ORDERS) and make changes to the code to enhance the program. I get an error 'GETWA_NOT_ASSIGNED' 'Field symbol has not yet been assigned' on the shortdump.
    This is strange since even if I don't make any major changes (eg. write a *note in the zprogram), whenever I run it, it gives me the above error. Has anyone encountered this before? If so, would anyone be able to help me out?
    Thanks in advance!
    Glenn

    Hello Ginger,
    Thanks for your reply! I copied the whole IDOC_INPUT_ORDERS program from SE37. It showed the function group VEDA then. The new program - ZIDOC_INPUT_ORDERS also belongs to the function group VEDA.
    Is this correct?
    Warm regards,
    Glenn
    PS. I did my changes in DEV Client 100 (Where we do our configurations), I'm testing in DEV Client 300. The changes made in Client 100 reflect in Client 300, but would there be any activations I need to perform in Client 300 as well?

  • Attaching function module to the webDynpro

    Hi,
    I am attaching the function module where i am using the "Web Dynpro for ABAP: Tutorial 2 - BAPI Usage". Now the problem is that in the document they have created the container form for the input parameters and in the context they have mapped the fields with the function module input parameters. But my requirement is little different. I have created the view which has dropdown boxes and I cant  create a new container form. Now please suggest how should I map the Import parameters with the screen fields(dropdowns).
    Please suggest some solution.
    I hope you would have seen this document"Web Dynpro for ABAP: Tutorial 2 - BAPI Usage". if not I will send the link.

    Actually in this application the data that is required is flowing. So I have tried making the import parameters as the controller attributes in spite of context node in the service call. Then it passes the data into the import parameters as WD_THIS->KUNNR.
    But still when I am debugging the data is not coming. What could be the issue.

  • Function Module Error In Uploading Data for Basic Pay Infotype

    Hi All,
    I'm trying to upload data into Basic Pay Infotype 0008 Using LSMW Subtype 0(Basic Contract). While we are trying to input values into ANSAL(Annual Salary) field directly using default wage type as 1000.
    We are gettting a error in function module RP_ANSAL_FROM_WAGETYPES.
    and eventhough we are inputting values into ANSAL field it is taking it as 0.00 by default .
    Kidly suggest me solution.
    Thanks,
    Vasanth

    Hi ..
    check this
    765785
    673372
    730976
    note 1032950
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
    Message was edited by:
            hari kv

Maybe you are looking for

  • Safari won't open at all

    When I try to open Safari the icon just bounces a few times and the rainbow wheel spins for a bit and then nothing happens. Safari doesn't open, the icon stops bouncing and everything just goes back to as if I never clicked on the icon to open Safari

  • In search of java class dependency utility

    Folks, We have developed a J2EE application where the "client" is a java application. In other words, we have created a JAR file that a user uses to launch our application. The manifest for this JAR file has a "Main-Class" attribute, so the following

  • Problem with slide transition

    I'm a newbie with Captivate and I'm trying to design an interactive training course. I decided to use buttons to allow the trainee to decide when they want to transition from slide to slide. The issue I am having is after you press the button to move

  • Adobe flash player and mac mini

    it seems to install but i am not finding it anywhere. Am i trying to install the wrong one or what???

  • Is there an example of populating a tabular form by selecting node in tree

    Hi, I am using apex 4.1. I have created a tree region, and would like to click on a child node and have it populate a tabular form. My tree attribute has the following query: select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1