How to get custom defined messages in WAD

Hi
can you please help me how to get customized error messages in WAD.
While I'm executing in RSRT the customer exit variable throws error message saying that 'No Sales orders exist for this Sold_To Party' but when I execute same query using Bex WAD, then no error message throwing for me for given sold_to party. I tried with all options as given in below code, but WAD gives me system error that "No values found for the customer exit variable 'Zxxxx'. Please help me in this regard. Should I do any settings in WAD to get custom defined messages. Kindly let me know
my code is as below
I_STEP = 2.
CASE i_vnam.
WHEN 'Custome exit variable'.
IF sy-subrc = 0.
ELSE.
               MESSAGE e060(/bmc/bw).  "No Authorization exist
                g_errflag1 = 'X'.
               exit.
               CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
                  EXPORTING
                    i_class  = '/bmc/bw'
                    i_type   = c_e                                    "'E'
                    i_number = '061'
                    i_msgv2  = l_msgv2.
                     RAISE NO_REPLACEMENT.
                l_s_range-low = g_soldto.
          l_s_range-sign = c_sign_i.
          l_s_range-opt  = c_range_opt_eq.
          APPEND l_s_range TO e_t_range.
ENDIF.
I_STEP = 3.
  READ TABLE i_t_var_range INTO w_s_var_range
              WITH KEY vnam = 'customer exit variabel'.
  IF sy-subrc = 0.
Check the flag and throw message 'No Sales orders'.
    IF g_errflag1 = 'X'.
      l_msgv1     = 'No Sales orders'.
Call the FM to populate message
      CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
        EXPORTING
          i_class  = c_r9
          i_type   = c_e                                    "'E'
          i_number = c_000
          i_msgv1  = l_msgv1
        EXCEPTIONS
          dummy    = 0
          OTHERS   = 0.
     CALL FUNCTION 'RRMS_MESSAGES_SHOW'.
     CALL FUNCTION 'RRMS_MESSAGES_DELETE'.
      RAISE NO_REPLACEMENT..
    ENDIF.
Thanks & Regards
silu

Hi
Custom Messages WAD

Similar Messages

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • How to get the Error message from hr_contact_rel_api.create_contact

    Hello All,
    I am using this API for creating a contact for an employee in R12.
    But, some times i am not able to create the contact successfully, and Unable to figure out proper reason for record erroring out.
    I dont find any out msg data variables for this API in order to check it for the Error.
    So, can any body help me how to get the ERROR Message for such APIs.
    Thanks inAdvance,
    Amarnadh Js

    user12243334 wrote:
    solved the issue on myselfIt would be nice if you could share the solution with us.
    Thanks,
    Hussein

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • How to get customer-specific objects into PCUI ?

    Hello,
    we want to get an Z-table as tab page of the business partner-application into PCUI. It should 'only' be possible to create new entries - today there is no need to modify or delete records.
    Does there exist something like a "cookbook" on this task or has anyone of you experience how to get customer-specific objects (without using EEWB) into PCUI ?
    Thanks in advance
    Martin

    Option 1:
    If you are good in ABAP.
    You can add new tab in which create a new Field group. Assign it to a model access clas in which handle the table update.You can get the details in PCUI cookbook itsel.
    Option 2:
    If you are good at java
    Develop an FM to update the table.
    Call the FM from webdynpro
    Include this webdynpro as HTML viewer in PCUI.
    Regards,
    Abdul Raheem S

  • How to get customer no relating to a Business partner No

    How to get customer no relating to a Business partner No . Is that Customer unique ?

    hi arshad,
    based on business partner u can get customer number. both tables having some uniqe field...based on that uniqe field u can identify business partner no.......
    if it is usefull review the points

  • Regarding Custom defined message types

    hi guys,
      i never got to work with custom defined message types but got to work with already defined message types and i just want to know why exactly do u need this and can any one please share their experience, why they have to design a custom defined message types especially in SD and MM with an example.
    thanks very much,
    pavan.

    What do you mean by custom message TYPE?   We create custom messages all the time at my company, by never a custom message TYPE.  Not sure what you mean here.
    Regards,
    Rich Heilman

  • ICI - How to display custom error messages in SAP CRM

    Hello,
    we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
    The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
    Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
    We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
    them to screen.
    Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
    running in the background.
    Regarding to this topic we've the following questions:
    - Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
    - Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
    Thank you in advance!
    Best regards
    René Holy

    NewUser7 wrote:
    Please correct me if I am wrong
    I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
    HTH

  • How to get current suspended message ID from context

    Hi all,
    I'm trying to get the Suspended Message Id from my orchestration.
    I don't want to get the this inside the orchestration, because that I already know how to do it.
    I've search inside this forum and get a solution, but actually does not work. 
    Using this: Microsoft.XLANGs.Core.Service.RootService.InstanceId  
    (http://social.msdn.microsoft.com/Forums/en-US/95d2c9d9-5cbe-4bca-9cef-da7aba984d3c/how-do-i-access-instance-id-of-a-message-from-orchestration?forum=biztalkgeneral)
    Also, I have searched in "all" properties of Microsoft.XLANGs.Core.Service.RootService and didn't had any luck
    My goal?
    I have a service that logs, to SQL, all errors in my biztalk applications. Right now is not saving the message id, and I do need.  (I can easily change the method to receive the message id, but I'm trying to avoid that because I have 30 applications
    using the same method/application).
    Also, I have another service that is listening to all suspended messages.. In here I have the message Id (and other data) using WMI... 
    Now, I need to correlate both info..
    Any help would be appreciated
    Ricardo Bessa

    Hi,
    Thanks for the reply. My answers inline.
    I already understood the logic that you said and I'm working on it. However, if you have more good inputs to give, please do! 
    Thanks
    Hi Ricardo,
    Let us be clear with your requirement.
    “I
    have another service that is listening to all suspended messages.. In here I have the message Id (and other data) using WMI... ” 
    - What this “service” is? Is this some service external to BizTalk from where you want to access the detail of the suspended message? If so then you go to use some way similar to my earlier reply. When you want to access the suspended message details,
    you got to access it from management db. The code which I have given in my earlier reply would do that. No other option in this case.
    Yes, I am already doing that. I'm using a Windows service that is listening for all suspended messages in BizTalk. In this
    windows service I can access to everything that I want (message Id; service type id; instance id; and many other properties...). My issue is not in here.
    “Actually
    when i call Microsoft.XLANGs.Core.Service.RootService.InstanceId I'm getting the property SendingOrchestrationID.” 
    - Are you try to access the message Instance ID from another child orchestration?
    SendingOrchestrationID is the orchestration instance
    ID where the message originated and you would get it when another orchestration (subprocess) which has been triggered by another orchestration (parent orch whose ID is
    SendingOrchestrationID). Detail us about where and how
    to you get this SendingOrchestrationID.
    Because when you want to access “Suspended” Orchestration’s message instance ID, you can’t achieve it by calling it from sub-processes.
    I'm using a external (custom) class library. 
    I have a custom log which tracks everything that goes in our BizTalk applications. When errors / warning I write that to a database table.
    This is made in different times, so when I log the error to the database I need "something" that exists in my other service (MEssageID; service type
    id; instance id; or other 'unique' property). Also, I don't want to change the log method, because (if I do that, I would need to change 30 applications).
    That's why I'm looking for a 'global' property that I can use, without changing (a lot) my code.
    When an Orchestration is suspended, it will be marked as “Suspended” in db and to get the messages associated with it, access the suspended Orchestration instance
    ID from the db and use this ID from db to get its related contents/messages IDs.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.
    Ricardo Bessa

  • How to create 'custom defined color' in the palette (Oracle 6i Form Buidl)?

    I'm new to Oracle 6i and urgently need to edit a colour scheme used on an existing set of Forms in Forms Builder.
    I can see how to select colors from the default palette but cannot find a way to edit the 8 spaces kept in the palette for 'custom defined colors'.
    Thanks in advance.

    Have you tried with something as
    IF  DBMS_ERROR_CODE IN (-20001)  then
    message ('what_you_want');for example in ON_ERROR trigger?

  • How to get custom trigger result when insert

    I set a trigger before insert, if the result was $aa = 50;
    how to get $aa?
    it doesn't work
    $ins_testtable->addColumn("t_num", "NUMERIC_TYPE", "VALUE", $aa);

    I tried this one, actually, {GLOBALS.variable_name} is one of mark-up language,I add echo $a this time, after submit, $a appear on the page, so I think "definea trigger" has been executed successfully, but still got error message
    <br />
    <br />http://uploads.screenshot-program.com/my.php?image=upl2682569831.jpg
    <br />
    <br />code
    <br />--------------------------------------------------
    <br /><?php require_once('Connections/conndb.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_conndb = new KT_connection($conndb, $database_conndb);<br /><br />//start definea trigger<br />function definea(&$tNG) {<br />global $a;<br />$a = 100;<br />}<br />//end definea trigger<br /><br />// Make an insert transaction instance<br />$ins_testtable = new tNG_insert($conn_conndb);<br />$tNGs->addTransaction($ins_testtable);<br />// Register triggers<br />$ins_testtable->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "ins");<br />$ins_testtable->registerTrigger("BEFORE", "definea", 50);<br />// Add columns<br />$ins_testtable->setTable("testtable");<br />$ins_testtable->addColumn("t_name", "STRING_TYPE", "POST", "t_name");<br />$ins_testtable->addColumn("t_num", "NUMERIC_TYPE", "VALUE", "{GLOBALS.a}");<br />$ins_testtable->setPrimaryKey("t_id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rstesttable = $tNGs->getRecordset("testtable");<br />$row_rstesttable = mysql_fetch_assoc($rstesttable);<br />$totalRows_rstesttable = mysql_num_rows($rstesttable);<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <br />
    <br />
    <br /><?php echo $a; ?>
    <br />
    <form id="form1" name="form1" method="post" action="">
    <br />
    <label for="t_name">tname</label>
    <br />
    <input type="text" name="t_name" id="t_name" />
    <br /> <?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <br />
    <input type="submit" name="ins" id="ins" value="submit" />
    <br /></form>
    <br />
    <br />

  • How to display custom error message in custom page

    Hi,
    I would like to show the exception details of custom component in my custom idoc page. Please let me know how to get the exception which is cached in Custom component in page.
    Thanks

    Hi,
    Do they get a 404 error? If it is the case, you can customize error pages : [Custom Error Pages|http://help.sap.com/saphelp_nw70/helpdata/en/ec/1273b2c413b2449e554eb7b910bce7/frameset.htm].
    Regards,
    Pierre

  • How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi

    Hi Experts,
    Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
    i/p for my report is am excel.
    excel is having  below formatt.
    To create salesdoc we are using SD_SALESDOC_CREATE bapi.
    but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom  field) in VBKD w.r.t salesdocument.
    Need your help what we need to do to reflect the value in vbkd table.
    Here temp will contains the data from excel
    1)
    FORM f_move_header_data .
       wg_header-doc_type            = wg_temp-auart .                   "Order type
       wg_header-sales_org           = wg_temp-vkorg .                   "Sales Organization
       wg_header-distr_chan          = wg_temp-vtweg .                   "Distribution Channel
       wg_header-division            = wg_temp-spart.                    "Division
       wg_header-sales_off           = wg_temp-vkbur .                   "Sales Office
       wg_header-sales_grp           = wg_temp-vkgrp .                   "Sales Group
       wg_header-purch_no_c          = wg_temp-bstnk .                   "Customer purchase order number
       wg_header-pymt_meth           = wg_temp-zlsch  .                  "Payment Method
       wg_header-zzychan_role        = wg_temp-zzychan_role_i.           "Channel Role
       wg_header-zzysub_role         = wg_temp-zzysub_role  .            "Submitter Role
       wg_header-zzy_inv_for_opt     = wg_temp-zzinv_format  .           "Invoice Format Optio
       wg_header-ord_reason          = wg_temp-augru  .                  "Order Reason Code
       wg_header-bill_block          = wg_temp-faksp.                    "Billing Block
       wg_headerx-doc_type            = c_set .                   "Order type
       wg_headerx-sales_org           = c_set .                   "Sales Organization
       wg_headerx-distr_chan          = c_set .                   "Distribution Channel
       wg_headerx-division            = c_set.                    "Division
       wg_headerx-sales_off           = c_set .                   "Sales Office
       wg_headerx-sales_grp           = c_set .                   "Sales Group
       wg_headerx-purch_no_c          = c_set .                   "Customer purchase order number
       wg_headerx-pymt_meth           = c_set  .                  "Payment Method
       wg_headerx-zzychan_role        = c_set.                    "Channel Role
       wg_headerx-zzysub_role         = c_set .                   "Submitter Role
       wg_headerx-zzy_inv_for_opt     = c_set .                   "Invoice Format Option
       wg_headerx-ord_reason          = c_set .                   "Order Reason Code
       wg_headerx-bill_block           = c_set.                    "Billing Block
    ENDFORM.                    " F_MOVE_HEADER_DATA
    2)
    FORM f_move_item_data .
       wg_item-itm_number          =   g_itmnumber.                              "Item number
       wg_item-material            =   wg_process-matnr .                        "Material
       wg_item-target_qty          =   wg_process-target_qty.                    "Targeted Qty
       wg_item-item_categ          =   wg_process-pstyv.                         "Sales document item category
       wg_item-zzylegal_i          =   wg_process-zzlegal.                       "Legal Contract
    **********Added this line for vbkd-ZZFV_SBCNT****************************
       wg_item-zzfv_sbcnt          = wg_process-zzfv_sbcnt.      
    APPEND wg_item TO i_item.
    wg_itemx-material            =   c_set .                        "Material
       wg_itemx-target_qty          =   c_set.                         "Targeted Qty
       wg_itemx-item_categ          =   c_set.                         "Sales document item category
       wg_itemx-zzylegal_i          =   c_set.                         "Legal Contract
       wg_itemx-zzsteady_date       =   c_set .                        "Amortization Start Date
       wg_itemx-zzsteady_end_dat    =   c_set.                         "Amortization Stop Date
    **********Added this line for vbkd-ZZFV_SBCNT****************************
       wg_itemx-ZZFV_SBCNt     =   c_set.   "
       APPEND wg_itemx TO i_itemx.
       CLEAR : wg_itemx. 
    endform. 
    3)           
    FORM f_move_head_ext
    wg_extension-structure   = c_ext_vbak.
       wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
    wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
       wg_ext_vbak-zzysub_role  = wg_temp-zzysub_role.
       wg_extension+30 = wg_ext_vbak.
    APPEND wg_extension to i_extension.
    CLEAR wg_extension.
       wg_extensionx-structure =  c_ext_vbakx.
       wg_ext_vbakx-zzinv_format = c_set.
      wg_ext_vbakx-zzlegal      = c_set.
       wg_ext_vbakx-zzychan_role = c_set.
       wg_ext_vbakx-zzysub_role  = c_set.
       wg_extensionx+30 = wg_ext_vbakx.
       APPEND wg_extensionx TO i_extensionx.
       CLEAR wg_extensionx.
    ENDFORM.                    " F_MOVE_HEAD_EXT
    *&      Form  F_MOVE_ITEM_EXT
    *       Item Extension
    4)
    FORM f_move_item_ext .
    * Structure for BAPI parameter Extension
       wg_extension-structure = c_ext_vbap.
       wg_ext_vbap-posnr      = g_itmnumber.
       wg_ext_vbap-zzsteady_date       =   wg_process-zzsteady_date .                 "Amortization Start Date
       wg_ext_vbap-zzsteady_end_dat    =   wg_process-zzsteady_end_dat.               "Amortization Stop Date
       wg_ext_vbap-zzlegal             =   wg_process-zzlegal.                        "Legal Contract
       wg_extension+30 = wg_ext_vbap.
    APPEND wg_extension to i_extension.
    * Structure for BAPI parameter Extension - Update Indicator Fields
       wg_extensionx-structure =  c_ext_vbapx.
       wg_ext_vbapx-posnr = g_itmnumber.
       wg_ext_vbapx-zzsteady_date       =   c_set .
       wg_ext_vbapx-zzsteady_end_dat    =   c_set.
    *  wg_ext_vbapx-zzlegal             =   c_set.
    *wg_process-zzfv_sbcnt = c_set.
       wg_extensionx+30 = wg_ext_vbapx.
       APPEND wg_extensionx TO i_extensionx.
       CLEAR wg_extensionx.
    and bapi calling is like below.
    CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
         EXPORTING
           sales_header_in       = wg_header
           sales_header_inx      = wg_headerx
           logic_switch          = wg_logic_switch
           business_object       = fp_bus_obj
           status_buffer_refresh = 'X'
         IMPORTING
           salesdocument_ex      = g_sorder
         TABLES
          return                = i_return
           sales_items_in        = i_item
           sales_items_inx       = i_itemx
           sales_partners        = i_partner
           sales_conditions_in   = i_cond
           sales_conditions_inx  = i_condx
           sales_text            = i_text
           extensionin           = i_extension
         extensionex           = i_extensionx.
    still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
    Please help me from this issue.
    Thank You..

    Hi,
    Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
    Please tell me how to solve it..
    Thanks & Regards,
    Reena..

  • How to get the return message after running BD20 tranaction ?

    Hi Gurus,
    My requirement is to Post vendor invoice through ALE/IDOC ( Inbound IDOC ).
    - For that I had generated the IDOC using  Function module 'IDOC_INBOUND_WRITE_TO_DB '
    - Then I had processed that generated IDOC by calling the standard program rbdapp01(BD20-Tranaction ) using the below statment
    SUBMIT rbdapp01 WITH SELECTION-TABLE lt_seltab .
    Could any one suggest me how to get the report output of standard program (rbdapp01) to an internal table so that I dispaly as an seperated report like Posted Document number with messages or Error message
    Suggest me any Function module or any other standard program to process the IDOC so that I can fulfill my requirement.
    Regards
    Paul

    Use can read the IDOC status after processing...
    Eg.
      SELECT * FROM edidc INTO TABLE t_idoc_control_tmp
          FOR ALL ENTRIES IN t_update WHERE docnum = t_update-docnum.
    and then add your own logic IF SY_SUBRC EQ 0.
    I hope this will help you.
    Regards,
    Amey

Maybe you are looking for