FOTY0001 Error while calling ref:populateXRefRow function in BPEL

I am getting folowing error while invoking populateXRefRow function in BPEL.
Expression is : ref:populateXRefRow("CustomerTable","SAP","SAP001","EBS","EBS_001","ADD")
TableName - CustomerTable
Column Names- SAP,EBS
Already ran xreftables.sql script and bounced the server too but still getting the error.
Any solution?
Thanks in Advance

HI
Usage of variables in populateXref statements in BPEL assign activities as follows :
For example, the following is not supported:
xref:populateXRefRow("apps_intg","common","common-12345",bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:appname'),bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id'),"ADD")
The following is supported:
xref:populateXRefRow("apps_intg","common","common-12345",string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root
-Element/ns3:appname')),string(bpws:getVariableData('Receive_Read_InputVariable','Root-Element','/ns3:Root-Element/ns3:Root-Element/ns3:id')),"ADD")
Please enclose the bpws:getVariableData() with string() function as populateXRefRow() expects strings as its arguments.
Hope this resolves and answers your question.
Cheers
Anirudh Pucha

Similar Messages

  • Error while calling the Mapping function module for BW Extraction

    Hi
    iam getting runtime error while calling the BW mapping function
    The error description is as shown below.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    <b>Short text</b>
        Type conflict during structure parameter transfer at CALL FUNCTION.
    <b>What happened?</b>
        Error in the ABAP Application Program
        The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
         because it has
        come across a statement that unfortunately cannot be executed.
    <b>Error analysis</b>   
    An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
         not caught in
        procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
         typed in such a way
        that only actual parameters are allowed, which are compatible in Unicode
         with respect to the fragment view. However, the specified actual
        parameter " " has an incompatible fragment view.
    I am passing the EXTRACT_DATA  parameter as specification LIKE with the associated type  - corresponding structure
    Please let me know how can i resolve this issue
    Regards
    Leon

    Dear benarji ,
    I'm having the  same problem help me to correct . I have mentioned below as what error i got.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
          has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught in
         procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
          typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "SFTWORKS" has an incompatible fragment view.
    Missing RAISING Clause in Interface
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     876
        Module type                             (FORM)
        Module Name                             PDF
    Trigger Location of Exception
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     894
        Module type                             (FORM)
        Module Name                             PDF
    Source Code Extract
    Line  SourceCde
      864 **            i_logo             = 'ENJOYSAP_LOGO'
      865 *            IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
      866
      867 ENDFORM.                    "alv_top_of_page1
      868 *&---------------------------------------------------------------------*
      869 *&      Form  PDF
      870 *&---------------------------------------------------------------------*
      871 *       text
    872 *----------------------------------------------------------------------*
    873 *  -->  p1        text
    874 *  <--  p2        text
    875 *----------------------------------------------------------------------*
    876 FORM pdf .
    877
    878 *  *** Smartforms & PDF ***
    879
    880   ssfctrlop-no_dialog = 'X'.
    881   ssfctrlop-preview   = 'X'.
    882   ssfctrlop-getotf    = 'X'.
    883   ssfcompop-tddest = 'ERP7'.
    884   DATA : mcheck LIKE sy-subrc.
    885   CLEAR : fm_name.
    886
    887   "Get Function module name for given smartform
    888   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    889     EXPORTING
    890       formname = 'ZSFDLOS1'
    891     IMPORTING
    892       fm_name  = fm_name.
    893
    >>>>   CALL FUNCTION fm_name
    895   EXPORTING
    896         control_parameters   = ssfctrlop
    897         output_options       = ssfcompop
    898         mrefno               = mrefno
    899 *       P_TITLE              = MTITLE
    900   IMPORTING
    901         document_output_info = st_document_output_info
    902         job_output_info      = st_job_output_info " IT_OTF_DATA
    903         job_output_options   = st_job_output_options
    904   TABLES
    905         it_works_sf          = sftworks
    906   EXCEPTIONS
    907         formatting_error     = 1
    908         internal_error       = 2
    909         send_error           = 3
    910         user_canceled        = 4
    911     OTHERS               = 5.
    912
    913   IF sy-subrc NE 0.
    Advance Thanks

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • Error while calling secured OSB proxy from BPEL

    Hi,
    I have a OSB Proxy service to which I have applied OWSM Policy:
    oracle/wss_username_token_service_policy
    In the Setting:
    Process WS-Security Header is set to Yes
    While calling this Proxy from BPEL I tried to append binding properties, I tried the following options:
    option1:
    wsseHeaders=credentials
    wssePassword=welcome1
    wsseUsername=weblogic
    option2:
    oracle.webservices.auth.password=welcome1
    oracle.webservices.auth.username=weblogic
    But neither of them work and I get the following error:
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-386200</con:errorCode>
    <con:reason>General web service security error</con:reason>
    <con:location>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    <Sep 21, 2010 9:49:30 AM PDT> <Error> <OSB Security> <BEA-387022> <An error ocur
    red during web service security inbound request processing [error-code: Security
    HeaderUnmarshallingError, message-id: 3659922647318344420--645cdd1d.12b2fe0c158.
    -7e45, proxy: OSBTest/Proxy Services/PrivatePersonnelDB_PS, operation: null]
    --- Error message:
    oracle.wsm.security.SecurityException: WSM-00069 : The security header is missin
    g.
    at oracle.wsm.security.policy.scenario.processor.UsernameTokenProcessor.
    verify(UsernameTokenProcessor.java:218)
    at oracle.wsm.security.policy.scenario.executor.WssUsernameTokenScenario
    Executor.receiveRequest(WssUsernameTokenScenarioExecutor.java:123)
    at oracle.wsm.security.policy.scenario.executor.SecurityScenarioExecutor
    .execute(SecurityScenarioExecutor.java:530)
    at oracle.wsm.policyengine.impl.runtime.AssertionExecutor.execute(Assert
    ionExecutor.java:41)
    at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeS
    impleAssertion(WSPolicyRuntimeExecutor.java:608)
    Truncated. see log file for complete stacktrace
    I have even tried to enable HTTP basic Authentication for the service, but did not work.
    Any help is highly appreciated.
    Thanks.

    Hi,
    I have applied oracle/wss_username_token_service_policy for my proxy service and trying to test that from OSB Test Console. I am getting below error,
    "[OSB Security - OWSM:387253]Failed to initialize Owsm Credential Manager. Please validate the Keystore Configuration"
    When i have launched Test Console for this proxy, i have observed in Security part, oracle/wss_username_token_client_policy is appearing. I am not sure why oracle/wss_username_token_client_policy is appearing there when i applied oracle/wss_username_token_service_policy to my proxy service.
    Also do i have to need to configure any Keystore for oracle/wss_username_token_service_policy, If so please tell me the process.
    If no key store is required where will the credentials be stored.
    Thanks
    Rajesh

  • ORABPEL-11811 - Error while calling PL/Sql API Into BPEL Process

    Hi,
    I have created a BPEL Process for creating a Order in Oracle using the synchronous process.
    I have followed the below steps.
    1) Created a Stored procedure using the Order Creation API's by passing Recard Type IN parameters.
    2) Created Synchronous BPEL Process and called the above Procedure using APPS Adapter.
    3) Created a xsd file and mapped the input and output parameter values using Transform Activity.
    After the above steps, when I try to run the BPEL process I am getting the below error:
    An error occurred while preparing and executing the APPS.PROC_PROC_NAME API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection
    ORA-06512: at "APPS.PROC_PROC_NAME ", line 149
    ORA-06512: at line 1
    [Caused by: ORA-06531: Reference to uninitialized collection
    ORA-06512: at "APPS.PROC_NAME", line 149
    ORA-06512: at line 1
    ; nested exception is:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.PROC_PROC_NAME API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection.
    Can anybody help in resolving the error?
    Thanks,
    Mastanvali.

    Here is the API Code..
    CREATE OR REPLACE PROCEDURE XXMAST_PRC(
    arg_in_p_header_rec           IN HeaderObject,
    arg_in_p_line_tbl          IN arrayLines,
    arg_out_x_return_status          OUT VARCHAR2,
    arg_out_order_number          OUT NUMBER,
    arg_out_header_id          OUT NUMBER,
    arg_out_flow_status_code     OUT VARCHAR2
    ) AS
         p_api_version_number          NUMBER;
         x_return_status      VARCHAR2(2);
         x_msg_count      NUMBER;
         x_msg_data      VARCHAR2(2000);
         v_msg_data               VARCHAR2(8000);
         v_msg_index_out               NUMBER(10);
         p_header_rec      OE_ORDER_PUB.HEADER_REC_TYPE;
         p_old_header_rec      OE_ORDER_PUB.HEADER_REC_TYPE;
         p_header_val_rec      OE_ORDER_PUB.Header_Val_Rec_Type;
         p_old_header_val_rec      OE_ORDER_PUB.Header_Val_Rec_Type;
         p_Header_Adj_tbl      OE_ORDER_PUB.Header_Adj_Tbl_Type;
         p_old_Header_Adj_tbl      OE_ORDER_PUB.Header_Adj_Tbl_Type;
         p_Header_Adj_val_tbl      OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
         p_old_Header_Adj_val_tbl      OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
         p_Header_price_Att_tbl      OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
         p_old_Header_Price_Att_tbl      OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
         p_Header_Adj_Att_tbl      OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
         p_old_Header_Adj_Att_tbl      OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
         p_Header_Adj_Assoc_tbl      OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
         p_old_Header_Adj_Assoc_tbl      OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
         p_Header_Scredit_tbl      OE_ORDER_PUB.Header_Scredit_Tbl_Type;
         p_old_Header_Scredit_tbl      OE_ORDER_PUB.Header_Scredit_Tbl_Type;
         p_Header_Scredit_val_tbl      OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
         p_old_Header_Scredit_val_tbl      OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
         p_line_tbl      OE_ORDER_PUB.Line_Tbl_Type;
         p_old_line_tbl      OE_ORDER_PUB.Line_Tbl_Type;
         p_line_val_tbl      OE_ORDER_PUB.Line_Val_Tbl_Type;
         p_old_line_val_tbl      OE_ORDER_PUB.Line_Val_Tbl_Type;
         p_Line_Adj_tbl      OE_ORDER_PUB.Line_Adj_Tbl_Type;
         p_old_Line_Adj_tbl      OE_ORDER_PUB.Line_Adj_Tbl_Type;
         p_Line_Adj_val_tbl      OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
         p_old_Line_Adj_val_tbl      OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
         p_Line_price_Att_tbl      OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
         p_old_Line_Price_Att_tbl      OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
         p_Line_Adj_Att_tbl      OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
         p_old_Line_Adj_Att_tbl      OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
         p_Line_Adj_Assoc_tbl      OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
         p_old_Line_Adj_Assoc_tbl      OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
         p_Line_Scredit_tbl      OE_ORDER_PUB.Line_Scredit_Tbl_Type;
         p_old_Line_Scredit_tbl      OE_ORDER_PUB.Line_Scredit_Tbl_Type;
         p_Line_Scredit_val_tbl      OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
         p_old_Line_Scredit_val_tbl      OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
         p_Lot_Serial_tbl      OE_ORDER_PUB.Lot_Serial_Tbl_Type;
         p_old_Lot_Serial_tbl      OE_ORDER_PUB.Lot_Serial_Tbl_Type;
         p_Lot_Serial_val_tbl      OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
         p_old_Lot_Serial_val_tbl      OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
         p_action_request_tbl      OE_ORDER_PUB.Request_Tbl_Type;
         x_header_rec OE_ORDER_PUB.Header_Rec_Type;
         x_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
         x_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
         x_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
         x_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
         x_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
         x_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
         x_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
         x_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
         x_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
         x_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
         x_Line_Adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
         x_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
         x_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
         x_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
         x_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
         x_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
         x_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
         x_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
         x_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
         x_action_request_tbl     OE_ORDER_PUB.Request_Tbl_Type;
         icount                    NUMBER :=0;
    BEGIN
         fnd_global.apps_initialize(1318,21623,660);
         fnd_client_info.set_org_context(204);
         p_header_rec:= OE_ORDER_PUB.G_MISS_HEADER_REC;
         SELECT OE_ORDER_HEADERS_S.NEXTVAL INTO p_header_rec.header_id FROM DUAL;
         dbms_output.put_line('Header ID          = '|| p_header_rec.header_id);
         p_api_version_number := 1.0;
    ------------------------------------------header code-----------------------------------------------------------------------
              p_header_rec.order_type_id          := arg_in_p_header_rec.order_type_id;
              p_header_rec.sold_to_org_id          := arg_in_p_header_rec.sold_to_org_id;
              p_header_rec.ship_to_org_id          := arg_in_p_header_rec.ship_to_org_id;
              p_header_rec.transactional_curr_code:= arg_in_p_header_rec.transactional_curr_code;
              p_header_rec.order_source_id          := arg_in_p_header_rec.order_source_id;
              p_header_rec.org_id               := arg_in_p_header_rec.org_id;
              p_header_rec.ship_from_org_id          := arg_in_p_header_rec.ship_from_org_id;
              p_header_rec.payment_term_id           := arg_in_p_header_rec.payment_term_id;
              p_header_rec.price_list_id          := 1000;
              p_header_rec.freight_terms_code          := 'Due';     -- Prepay and Add
              p_header_rec.operation               := OE_GLOBALS.G_OPR_CREATE;
              p_header_rec.pricing_date          := SYSDATE;
              p_header_rec.creation_date          := SYSDATE;
              p_header_rec.booked_flag          := 'N';
              p_header_rec.created_by               := 1318;
              p_header_rec.last_updated_by          := 1318;
              p_header_rec.last_update_date          := SYSDATE;
              p_header_rec.invoice_to_org_id          := 1424;
              p_header_rec.version_number          := 1;
              p_header_rec.open_flag               := 'Y';
              p_header_rec.ordered_date          := SYSDATE;
              p_header_rec.flow_status_code          := 'ENTERED';
              p_header_rec.tax_exempt_flag          := 'S';
              p_header_rec.salesrep_id          := -3;
    --------------------------------------------LINES CODE------------------------------------------------------------
         icount := 0;
         for icount in 1 .. arg_in_p_line_tbl.count loop
              p_line_tbl(icount) := Oe_Order_Pub.G_MISS_LINE_REC;
              SELECT OE_ORDER_LINES_S.NEXTVAL INTO p_line_tbl(icount).line_id FROM DUAL;
              dbms_output.put_line('Line ID               = '|| p_line_tbl(icount).line_id);
         p_line_tbl(icount).inventory_item_id          := arg_in_p_line_tbl(icount).inventory_item_id;
         p_line_tbl(icount).ordered_quantity          := arg_in_p_line_tbl(icount).ordered_quantity;
         p_line_tbl(icount).pricing_quantity          := arg_in_p_line_tbl(icount).pricing_quantity;
         p_line_tbl(icount).line_type_id               := arg_in_p_line_tbl(icount).line_type_id;
         p_line_tbl(icount).line_number          := icount;
         p_line_tbl(icount).shipment_number          := arg_in_p_line_tbl(icount).shipment_number;
         p_line_tbl(icount).ship_to_org_id          := arg_in_p_line_tbl(icount).ship_to_org_id;
         p_line_tbl(icount).sold_to_org_id          := arg_in_p_line_tbl(icount).sold_to_org_id;
         p_line_tbl(icount).salesrep_id          := arg_in_p_line_tbl(icount).salesrep_id;
         p_line_tbl(icount).payment_term_id          := arg_in_p_line_tbl(icount).payment_term_id;
              p_line_tbl(icount).price_list_id          := 1000;
              p_line_tbl(icount).operation               := OE_GLOBALS.G_OPR_CREATE;
              p_line_tbl(icount).open_flag               := 'Y';
              p_line_tbl(icount).booked_flag               := 'N';
              p_line_tbl(icount).header_id               := p_header_rec.header_id;
              p_line_tbl(icount).line_category_code          := 'ORDER';
              p_line_tbl(icount).order_quantity_uom          :='Ea';
              p_line_tbl(icount).request_date               := SYSDATE;
              p_line_tbl(icount).schedule_ship_date          := SYSDATE;
              p_line_tbl(icount).ship_from_org_id          := 204;
              p_line_tbl(icount).flow_status_code          := 'ENTERED';
              p_line_tbl(icount).ship_to_customer_id          := 1290;
              p_line_tbl(icount).invoice_to_org_id          := 1424;
              p_line_tbl(icount).tax_exempt_flag          := 'S';
              p_line_tbl(icount).tax_date               := '02-Mar-2005';
              p_line_tbl(icount).tax_code               := 'Location';
              SELECT OE_PRICE_ADJUSTMENTS_S.NEXTVAL INTO p_Line_Adj_tbl(icount).price_adjustment_id FROM DUAL;
              dbms_output.put_line('Price Adjustment ID     = '|| p_Line_Adj_tbl(icount).price_adjustment_id);
              p_Line_Adj_tbl(icount).created_by          := 1318;
              p_Line_Adj_tbl(icount).header_id          := p_header_rec.header_id;
              p_Line_Adj_tbl(icount).line_id               := p_line_tbl(icount).line_id;
              p_Line_Adj_tbl(icount).percent               := 10;
              p_Line_Adj_tbl(icount).operation          := OE_GLOBALS.G_OPR_CREATE;
              p_Line_Adj_tbl(icount).list_header_id          := 8988;
              p_Line_Adj_tbl(icount).list_line_id          := 16596;
              p_Line_Adj_tbl(icount).list_line_type_code     := 'DIS';
              p_Line_Adj_tbl(icount).arithmetic_operator     := 'AMT';
              p_Line_Adj_tbl(icount).updated_flag          := 'Y';
              p_Line_Adj_tbl(icount).update_allowed          := 'Y';
              p_Line_Adj_tbl(icount).applied_flag          := 'Y';
              p_Line_Adj_tbl(icount).automatic_flag          := 'N';
              p_Line_Adj_tbl(icount).OPERAND               := 10;
         end loop;
         oe_msg_pub.initialize;
         oe_order_pub.process_order
              ( p_api_version_number =>      p_api_version_number
              , p_init_msg_list =>      FND_API.G_FALSE
              , p_return_values =>      FND_API.G_FALSE
              , p_action_commit =>      FND_API.G_FALSE
              , x_return_status =>      x_return_status
              , x_msg_count =>      x_msg_count
              , x_msg_data =>      x_msg_data
              , p_header_rec =>     p_header_rec
              , p_old_header_rec =>     p_old_header_rec
              , p_header_val_rec =>     p_header_val_rec
              , p_old_header_val_rec =>     p_old_header_val_rec
              , p_Header_Adj_tbl =>     p_Header_Adj_tbl
              , p_old_Header_Adj_tbl =>     p_old_Header_Adj_tbl
              , p_Header_Adj_val_tbl =>     p_Header_Adj_val_tbl
              , p_old_Header_Adj_val_tbl =>     p_old_Header_Adj_val_tbl
              , p_Header_price_Att_tbl =>     p_Header_price_Att_tbl
              , p_old_Header_Price_Att_tbl =>     p_old_Header_Price_Att_tbl
              , p_Header_Adj_Att_tbl =>     p_Header_Adj_Att_tbl
              , p_old_Header_Adj_Att_tbl =>      p_old_Header_Adj_Att_tbl
              , p_Header_Adj_Assoc_tbl =>     p_Header_Adj_Assoc_tbl
              , p_old_Header_Adj_Assoc_tbl =>      p_old_Header_Adj_Assoc_tbl
              , p_Header_Scredit_tbl =>     p_Header_Scredit_tbl
              , p_old_Header_Scredit_tbl =>     p_old_Header_Scredit_tbl
              , p_Header_Scredit_val_tbl =>     p_Header_Scredit_val_tbl
              , p_old_Header_Scredit_val_tbl =>     p_old_Header_Scredit_val_tbl
              , p_line_tbl =>     p_line_tbl
              , p_old_line_tbl =>     p_old_line_tbl
              , p_line_val_tbl =>     p_line_val_tbl
              , p_old_line_val_tbl =>     p_old_line_val_tbl
              , p_Line_Adj_tbl =>     p_Line_Adj_tbl
              , p_old_Line_Adj_tbl =>     p_old_Line_Adj_tbl
              , p_Line_Adj_val_tbl =>     p_Line_Adj_val_tbl
              , p_old_Line_Adj_val_tbl =>     p_old_Line_Adj_val_tbl
              , p_Line_price_Att_tbl =>     p_Line_price_Att_tbl
              , p_old_Line_Price_Att_tbl =>     p_old_Line_Price_Att_tbl
              , p_Line_Adj_Att_tbl =>     p_Line_Adj_Att_tbl
              , p_old_Line_Adj_Att_tbl =>      p_old_Line_Adj_Att_tbl
              , p_Line_Adj_Assoc_tbl =>     p_Line_Adj_Assoc_tbl
              , p_old_Line_Adj_Assoc_tbl =>      p_old_Line_Adj_Assoc_tbl
              , p_Line_Scredit_tbl =>     p_Line_Scredit_tbl
              , p_old_Line_Scredit_tbl =>     p_old_Line_Scredit_tbl
              , p_Line_Scredit_val_tbl =>     p_Line_Scredit_val_tbl
              , p_old_Line_Scredit_val_tbl =>     p_old_Line_Scredit_val_tbl
              , p_Lot_Serial_tbl =>     p_Lot_Serial_tbl
              , p_old_Lot_Serial_tbl =>     p_old_Lot_Serial_tbl
              , p_Lot_Serial_val_tbl =>     p_Lot_Serial_val_tbl
              , p_old_Lot_Serial_val_tbl =>     p_old_Lot_Serial_val_tbl
              , p_action_request_tbl =>     p_action_request_tbl
              , x_header_rec =>      x_header_rec
              , x_header_val_rec =>      x_header_val_rec
              , x_Header_Adj_tbl =>      x_Header_Adj_tbl
              , x_Header_Adj_val_tbl =>      x_Header_Adj_val_tbl
              , x_Header_price_Att_tbl =>      x_Header_price_Att_tbl
              , x_Header_Adj_Att_tbl =>      x_Header_Adj_Att_tbl
              , x_Header_Adj_Assoc_tbl =>      x_Header_Adj_Assoc_tbl
              , x_Header_Scredit_tbl =>      x_Header_Scredit_tbl
              , x_Header_Scredit_val_tbl =>      x_Header_Scredit_val_tbl
              , x_line_tbl =>      x_line_tbl
              , x_line_val_tbl =>      x_line_val_tbl
              , x_Line_Adj_tbl =>      x_Line_Adj_tbl
              , x_Line_Adj_val_tbl =>      x_Line_Adj_val_tbl
              , x_Line_price_Att_tbl =>      x_Line_price_Att_tbl
              , x_Line_Adj_Att_tbl =>      x_Line_Adj_Att_tbl
              , x_Line_Adj_Assoc_tbl =>      x_Line_Adj_Assoc_tbl
              , x_Line_Scredit_tbl =>      x_Line_Scredit_tbl
              , x_Line_Scredit_val_tbl =>      x_Line_Scredit_val_tbl
              , x_Lot_Serial_tbl =>      x_Lot_Serial_tbl
              , x_Lot_Serial_val_tbl =>      x_Lot_Serial_val_tbl
              , x_action_request_tbl     =>      x_action_request_tbl
         IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
              COMMIT;
         dbms_output.put_line('Return Status - '|| SUBSTR (x_return_status,1,255));
         dbms_output.put_line('------------------------------------');
         dbms_output.put_line('Order Number ==== '|| x_header_rec.order_number);
         dbms_output.put_line('------------------------------------');
              arg_out_x_return_status := x_return_status;
              arg_out_order_number          := x_header_rec.order_number;
              arg_out_header_id          := p_header_rec.header_id;
              arg_out_flow_status_code     := p_header_rec.flow_status_code;
         ELSE
              dbms_output.put_line('Return Status = '|| SUBSTR (x_return_status,1,255));
              dbms_output.put_line('Msg Count = '|| TO_CHAR(x_msg_count));
              dbms_output.put_line('Msg Data = '|| SUBSTR (x_msg_data,1,255));
              IF x_msg_count >1 THEN
                   FOR I IN 1..x_msg_count LOOP
                        Oe_Msg_Pub.get(
                             p_msg_index           => i
                             ,p_encoded           => Fnd_Api.G_FALSE
                             ,p_data           => v_msg_data
                             ,p_msg_index_out      => v_msg_index_out
                        DBMS_OUTPUT.PUT_LINE('v_msg_index_out '|| v_msg_index_out);
                        DBMS_OUTPUT.PUT_LINE('v_msg_data '|| v_msg_data);
                   END LOOP;
              END IF;
         END IF;
    END;
    /

  • Error while calling external library functions

    Using visual studio I wrote the following code test javascript communication with external C/C++ libraries:
    aabc.cpp :
    extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc);
    extern "C" __declspec(dllexport) long ESGetVersion (void );
    extern "C" __declspec(dllexport) void ESFreeMem (void* p);
    extern "C" __declspec(dllexport) void ESTerminate (void );
    extern "C" __declspec(dllexport) double AddNumbers(void);
    double AddNumbers(double a, double b)
    return a + b;
    long ESGetVersion (void){
    return 5;
    And the code that I wrote in javascript is:
    var obj = new ExternalObject("lib: aabc.dll");
    alert(obj.version);
    var aa = obj.AddNumbers(10, 20);
    alert(aa);
    It seems to me that it loaded successfully due to the output I am getting from the second statement. But I am getting error at the third statement where I called AddNumbers(10,20) function.
    Somebody help me.
    Thanks in advance,
    sailu

    I have the same problem. This is my code:
    extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc);
    extern "C" __declspec(dllexport) long ESGetVersion (void );
    extern "C" __declspec(dllexport) void ESFreeMem (void* p);
    extern "C" __declspec(dllexport) void ESTerminate (void );
    extern "C" __declspec(dllexport) int AddNumbers(int a, int b);
    extern "C" __declspec(dllexport) char* ESInitialize (TaggedData* argv, long argc)
    return "AddNumbers_dd";
    int AddNumbers(int a, int b)
    return a + b;
    long ESGetVersion (void){
    return 17;
    And the code that I wrote in javascript is:
    var obj = new ExternalObject("lib: mydll.dll");
    var x = obj.AddNumbers(10, 20);
    alert(x);
    The version of the library is correct, but when I try to use the function "AddNumbers" I receive this error "AddNumbers is not function".
    What would be the correct procedure to call a function inside a DLL?

  • "Invalid column type" error while calling pl/sql function in AM

    Code written in AM is ...
    String MISSING_TIME_SHEET_CALL = "begin ? = missing_time_sheet(?,?,?,?); end;";
    CallableStatement timeSheetStmt = txn.createCallableStatement(MISSING_TIME_SHEET_CALL, 1);
    timeSheetStmt.registerOutParameter(1,Types.BOOLEAN);
    timeSheetStmt.registerOutParameter(4,Types.DATE);
    timeSheetStmt.registerOutParameter(5,Types.DATE);
    timeSheetStmt.setString(2,personId);
    timeSheetStmt.setDate(3,resTermRow.getLastWorkingDate().dateValue());
    timeSheetStmt.execute();
    Body of Function is
    function missing_time_sheet (p_person_id varchar2, p_last_date date, p_start_date out date, p_end_date out date)
    -- Arvind
    return boolean

    refer this article and check your code.
    http://prasanna-adf.blogspot.com/2008/11/callable-statement.html
    --Prasanna                                                                                                                                                                                                                                                       

  • Invalid column type error while calling db function.

    We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
    When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
    Thanks,
    Vijay.
    stackTrace:
    java.sql.SQLException: Invalid column type
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
    at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
    at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
    at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
    at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
    at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
    at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
    ----------------------

    Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
    The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
    What is happening at runtime may be the following:
    (1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
    (2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
    Are you using JDK 1.2 / runtime12.zip?
    In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

  • Error while calling RFC when using BSP Web Interface

    Hi,
    we have a problem with the Authorization when we use an Web Interface for BSP. We have assigned all roles to the user which were mentioned in the SAP standard documentation:
    R_AREA   
    R_METHOD 
    R_PACKAGE
    R_PARAM  
    R_PLEVEL 
    R_PM_NAME
    R_PROFILE
    R_STS_PT 
    R_STS_SUP
    R_WEBITF 
    S_RS_ADMWB
    S_RS_AUTH
    S_RS_COMP
    S_RS_COMP1
    S_RS_DAS 
    S_RS_ICUBE
    but we still get the error message: "Error while calling RFC".
    When using a user with SAP_ALL, it works.
    What can we do?
    Thx for your time.
    Joerg

    Actually that's surprising - because BSP (Business Server Pages) and RFC (Remote Function Call) are not related; they use totally different transport protocols (http vs. RFC). Even if an BSP application is calling a function module remotely (acting as RFC client) no authorizations for S_RFC are required - in the calling system (but in the called system, i.e. the RFC server).
    Since assigning SAP_ALL seems to "cure" the problem, it seems to be an authorization issue, indeed. In that case it makes sense to use the authorization trace (ST01 - notice: that's specific to one single ABAP application server; you might have to activate the trace on multiple instances) to find out which authorizations are checked / demanded.

  • Error while calling up RFC

    Hi GuRuS,
               I am working on BI 7.0. When I open the BPS workbench using Transaction bps0 and select the planning area 4TPM9000, and click on either "Variables" tab or "Master Data" tab or when I click on "Adhoc Package", I get this error " You have selected a function, to execute this the system must set up an RFC connection to another SAP System. However, setting up this connection was not successful. The following internal error message was generated: Error while calling up RFC. " 
    FYI I have done RFC connections between my CRM 2007 system and BI 7.0 system using Tr.SM59 and checked the connections from both the ends and it is working fine. So, pls show me the way out.
    Thanks in advance,
    Raghu

    Hi...
         The roles SAP_ALL and SAP_NEW are assigned for the RFCUser.
    Regards,
    Raghu

  • Error while calling PERFORM in SAPSCRIPT

    Hi all,
    I am encoutering a error while calling a perform in sapscript.
    Does anyone know what is the main cause?
    The shortdump description is:
    Short text                            
        Missing parameter with PERFORM.   
    I do not know what is missing here.
    /: PERFORM GET_SPRAS IN PROGRAM ZPFI_F150_DUNN
    /: USING &MHNK-KUNNR&
    /: CHANGING &GV_SPRAS&
    /: CHANGING &GV_LAND1&
    /: ENDPERFORM
    *&      Form  GET_SPRAS
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                          outtable  STRUCTURE itcsy
                          outtable2 STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable2 INDEX 1.
        outtable2-value = gv_land1.
        MODIFY outtable INDEX 1.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.

    Hi,
    Though there are a lot of importing parameters, you should give only one structure for outtable, and read as index 1 and index 2.
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                                              outtable  STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable INDEX 2.
        outtable-value = gv_land1.
        MODIFY outtable INDEX 2.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:00 AM
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:10 AM

  • Access denied Error while calling Web Service form Infopath Form 2010.

    Hi Dear All,
    I have been facing an error while calling an GetUserProfileByName() web service method from InfoPath 2010 from.
    i have FBA(Forms Base Authentication )configured . After Infopath form published to site collection when i select an user from people picker control i want to get Email Id of Selected user for that i am calling getUserProfileByName() Web Method, but 
    i am getting Access denied error code 500.
    Any Help would be more than welcome.
    Thanks.

    Hi,
    Greetings. Please check 
    Check the IE settings. Click Internet Options> Security>Custom level. Make sure that the ‘Access data source across domains’ is enabled. Make sure that you have permission to the web service and to the content which the web service tries to modify.
    For more information, please refer to this site:
    "Access is denied." error in Infopath 2007 form + ASMX: http://us.generation-nt.com/answer/access-denied-error-infopath-2007-form-plus-asmx-help-65808252.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Error while calling BAPI_PARTNEREMPLOYEE_CREATE

    Hi All,
    I am trying to call BAPI_PARTNEREMPLOYEE_CREATE BAPI in my java application using JCO But internally this BAPI calls VAP1 screen so currently i am getting error while calling this BAPI.
    please suggest to overcome this error
    Thanks in advance,
    Arati

    Hi,
    The issue has to be resolved by ABAPers. The process they have to follow is
    a) Record screens for transaction VAP1  - BDC(If I am not wrong)
    b) Create Custom BAPI(fucntion modle)- Embed the code of screen recording and include functionality of BAPI_PARTNEREMPLOYEE_CREATE in this
    The above option I used. There can be possibility of alternatives to this.
    regards,
    ganga

  • Getting error while calling this BAPI:Field MATNR has been transferred inco

    Hi,
    I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
    I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
    the errror is :Field MATNR has been transferred inconsistently or is blank.
    I have written the below logic in the program to upload material master data into SAP.
    Please help me out to resolve this issue.
    Thanks in advance.
    Program logic which i have wriiten in the program is
    LOOP AT it_rpt.
        CLEAR lwa_return.
        v_tabix  = sy-tabix.
        IF ( it_rpt-werks EQ p_werks AND
           it_rpt-matnr IS INITIAL ).
    retrieve internal number
          PERFORM get_internal_number USING lc_mtart
                                            lc_mbrsh
                                   CHANGING it_rpt-matnr.
        ENDIF.
        IF NOT it_rpt-matnr IS INITIAL.
          PERFORM convert_field_input CHANGING it_rpt-matnr.
        ENDIF.
    Header data
        CLEAR lwa_headdata.
        lwa_headdata-material                = it_rpt-matnr.
        lwa_headdata-ind_sector              = lc_mbrsh.
        lwa_headdata-matl_type               = lc_mtart.
        lwa_headdata-basic_view              = 'X'.
        IF NOT it_rpt-vkorg IS INITIAL.
          lwa_headdata-sales_view            = 'X'.
        ENDIF.
        lwa_headdata-purchase_view           = 'X'.
        lwa_headdata-mrp_view                = 'X'.
        lwa_headdata-storage_view            = 'X'.
        lwa_headdata-forecast_view           = 'X'.
        lwa_headdata-work_sched_view         = 'X'.
        lwa_headdata-account_view            = 'X'.
        lwa_headdata-cost_view               = 'X'.
    *Client data
        CLEAR: lwa_clientdata, lwa_clientdatax.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdata-matl_group          = it_rpt-matkl.
          lwa_clientdata-old_mat_no          = it_rpt-bismt.
          lwa_clientdata-base_uom            = it_rpt-meins.
          lwa_clientdata-manu_mat            = it_rpt-mfrpn.
          lwa_clientdata-mfr_no              = it_rpt-mfrnr.
        ENDIF.
        lwa_clientdata-division              = it_rpt-spart.
        lwa_clientdata-unit_of_wt            = lc_gewei.
        lwa_clientdata-trans_grp             = lc_tragr.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdatax-matl_group         = 'X'.
          lwa_clientdatax-old_mat_no         = 'X'.
          lwa_clientdatax-base_uom           = 'X'.
          lwa_clientdatax-manu_mat           = 'X'.
          lwa_clientdatax-mfr_no             = 'X'.
        ENDIF.
        lwa_clientdatax-unit_of_wt           = 'X'.
        lwa_clientdatax-trans_grp            = 'X'.
        lwa_clientdatax-division             = 'X'.
    Material Description
        IF it_rpt-werks EQ c_1251.
          lt_matdesc-langu           = sy-langu.
          lt_matdesc-matl_desc       = it_rpt-maktx.
          APPEND lt_matdesc.
        ENDIF.
    *Plant data
        CLEAR lwa_plantdata.
        lwa_plantdata-plant                  = it_rpt-werks.
        lwa_plantdata-availcheck             = lc_mtvfp.
        lwa_plantdata-mrp_type               = lc_dismm.
        lwa_plantdata-mrp_group              = lc_disgr.
        lwa_plantdata-auto_p_ord             = 'X'.
        lwa_plantdata-proc_type              = 'F'.
        IF it_rpt-werks EQ c_1251.
          it_rpt-prctr  = lc_prctr.                 "1252
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-prctr  = lc_prctr1.                "1262
        ENDIF.
        lwa_plantdata-profit_ctr             = it_rpt-prctr.
        lwa_plantdata-period_ind             = lc_perkz.
        lwa_plantdata-max_stock              = it_rpt-stawn.
        lwa_plantdata-countryori             = it_rpt-herkl.
        lwa_plantdata-sloc_exprc             = it_rpt-lgfsb.
        CLEAR lwa_plantdatax.
        lwa_plantdatax-plant                 = it_rpt-werks.
        lwa_plantdatax-availcheck            = 'X'.
        lwa_plantdatax-mrp_type              = 'X'.
        lwa_plantdatax-mrp_group             = 'X'.
        lwa_plantdatax-auto_p_ord            = 'X'.
        lwa_plantdatax-proc_type             = 'X'.
        lwa_plantdatax-profit_ctr            = 'X'.
        lwa_plantdata-period_ind             = 'X'.
        lwa_plantdatax-max_stock             = 'X'.
        lwa_plantdatax-countryori            = 'X'.
        lwa_plantdatax-sloc_exprc            = 'X'.
    *Valuation data
        CLEAR lwa_valuationdata.
        lwa_valuationdata-val_area           = it_rpt-werks.
        lwa_valuationdata-price_ctrl         = lc_vprsv.
        lwa_valuationdata-price_unit         = lc_peinh.
        lwa_valuationdata-val_class          = it_rpt-bklas.
        CLEAR lwa_valuationdatax.
        lwa_valuationdatax-val_area          = it_rpt-werks.
        lwa_valuationdatax-price_ctrl        = 'X'.
        lwa_valuationdatax-price_unit        = 'X'.
        lwa_valuationdatax-val_class         = 'X'.
    *Storage location
        CLEAR lwa_storagelocation.
        lwa_storagelocation-plant            = it_rpt-werks.
        lwa_storagelocation-stge_loc         = it_rpt-lgort.
        CLEAR lwa_storagelocationx.
        lwa_storagelocationx-plant           = it_rpt-werks.
        lwa_storagelocationx-stge_loc        = it_rpt-lgort.
    *Tax Classifications
        IF it_rpt-werks EQ c_1251.
          it_rpt-tatyp = lc_tatyp.       "u2018MWSTu2019
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-tatyp = lc_tatyp1.      "u2018UTXJu2019
        ENDIF.
        lt_taxclass-tax_type_1              = it_rpt-tatyp.
        lt_taxclass-taxclass_1              = lc_taxkm.
        lt_taxclass-tax_ind                 = lc_taxim.
        APPEND lt_taxclass.
    *Sales data
        CLEAR: lwa_salesdata, lwa_salesdatax.
        IF it_rpt-werks EQ c_1251.
          it_rpt-vkorg = lc_vkorg.
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-vkorg = lc_vkorg1.
        ENDIF.
        lwa_salesdata-sales_org           = it_rpt-vkorg.
        lwa_salesdata-distr_chan          = lc_vtweg.
        lwa_salesdata-cash_disc           = lc_sktof.
        lwa_salesdata-item_cat            = lc_mtpos.
        lwa_salesdatax-sales_org          = it_rpt-vkorg.
        lwa_salesdatax-distr_chan         = lc_vtweg.
        lwa_salesdatax-cash_disc          = 'X'.
        lwa_salesdatax-item_cat           = 'X'.
    *Forecast parameters
        CLEAR: lwa_forecast, lwa_forecastx.
        lwa_forecast-plant                = it_rpt-werks.
        lwa_forecast-fore_model           = lc_prmod.
        lwa_forecast-fore_pds             = lc_anzpr.
        lwa_forecast-hist_vals            = lc_peran.
        lwa_forecastx-plant               = it_rpt-werks.
        lwa_forecastx-fore_model          = 'X'.
        lwa_forecastx-fore_pds            = 'X'.
        lwa_forecastx-hist_vals           = 'X'.
    Purchasing long text
        IF it_rpt-werks EQ c_1251.
          IF it_rpt-tdline1 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'BEST'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline1.
          ENDIF.
    Basic long text
          IF it_rpt-tdline2 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'GRUN'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline2.
          ENDIF.
    *Units of measure
          CLEAR : lt_uom,lt_uomx.
          lt_uom-alt_unit     = it_rpt-meins.
          lt_uom-alt_unit_iso = it_rpt-meins.
          lt_uom-unit_of_wt   = it_rpt-gewei.
          APPEND lt_uom.
          lt_uomx-alt_unit      = it_rpt-meins.
          lt_uomx-alt_unit_iso  = it_rpt-meins.
          lt_uomx-unit_of_wt    = 'X'.
          APPEND lt_uomx.
        ENDIF.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata             = lwa_headdata
            clientdata           = lwa_clientdata
            clientdatax          = lwa_clientdatax
            plantdata            = lwa_plantdata
            plantdatax           = lwa_plantdatax
            forecastparameters   = lwa_forecast
            forecastparametersx  = lwa_forecastx
            storagelocationdata  = lwa_storagelocation
            storagelocationdatax = lwa_storagelocationx
            valuationdata        = lwa_valuationdata
            valuationdatax       = lwa_valuationdatax
            salesdata            = lwa_salesdata
            salesdatax           = lwa_salesdatax
          IMPORTING
            return               = lwa_return
          TABLES
            materialdescription  = lt_matdesc
            unitsofmeasure       = lt_uom
            unitsofmeasurex      = lt_uomx
            materiallongtext     = lt_longtext
            taxclassifications   = lt_taxclass
            returnmessages       = it_messages.
    Regards,
    Reddy

    Can you check with below code .
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
            EXPORTING
              INPUT        =  it_rpt-matnr       
    IMPORTING
              OUTPUT       =  it_rpt-matnr
            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.
    Move  it_rpt-matnr to    lwa_headdata-material  .
    Regard's
    Smruti

Maybe you are looking for