Validation on BAPI output

Hi Experts,
      I have a BAPI with output either 1 or 0, if output of BAPI is 1 it has to navigate to one form, if output is 0 it should navigate to another form. Can any one of you please suggest me how to perform validation on BAPI output.
Regards,
Lakshmi

Hi Prassana,
You can use 'store' to load 1 or 0 from your BAPI by drawing a line with store from your BAPI output port. And use visibility condition on your form.
On your store element, assigned your field (field @field).
Drag two forms to your board, one on top of other, and make a visibilty condition such as: @field==1
When you BAPI sends the value==1 to 'Store' form 01 is shown otherwise form 2 is shown.
Regards,
Gilson

Similar Messages

  • Calling SAPGui depending on BAPI Output and User selection

    Hi everybody,
    can I somehow call a SAPGui (like in the transaction iView) depending on BAPI Output and the selection of a user?
    The problem is the following:
    Through an input form, a BAPI function receives an input parameter. I then get several results and want to select one of these results. With this result a predefined transaction <b>with SAPGui</b> should start.
    For example transaction MW23 with purchase order number 1234567.
    Does anybody know a solution to this?
    Thanks, Rebecca

    Hi Raju,
    as far as I know, you always need an ITS if you want to present a transaction in Portal as HTMLGUI.
    However, I now found a way how to use the transaction iView with the WINGui. Of course, the SAPGui client has to be installed locally.
    With the following URL the transaction iView can be called and the user can jump into a certain transaction with a certain parameter, in this case with the purchase order number:
    ('http://SERVER:50000/irj/servlet/prt/portal/prtroot/pcd!3a!2f!2fportal_content!2fcom.sap.pct!2ftemplates!2fiviews!2fcom.sap.portal.sap_transaction_iview?System=Q06&TCode=me22n&GuiType=WinGui&DynamicParameter=%7EOKCODE%3D%26RM06E-BSTNR%3D')(@PO_NUMBER)('&SAP_Dynp_AutoStart=true')
    Whereas
    SERVER has to be adapted,
    Q06 is a system for R/3 configured in the portal,
    TCode can be any transaction which can accept parameters,
    @PO_NUMBER is the variable from visual composer.
    Regards, Rebecca

  • Valid shared variable output does not work!

    I am having a problem getting the string to shared variable to function correctly.  Specifically the "Valid Shared Variable?" output.  It always give a false output even when I know the variable is deployed.  Could it be that it only functions correctly on shared variables from the localhost and not a remote system?  If so is there another way to check?
    Thanks
    Todd

    There is a community example on this at http://decibel.ni.com/content/docs/DOC-3861
    The DLL is included in DSC, but if you have 2009 you may have to relink it. There is a boolean output for valid in this as well. Pop this in a subvi, and you have the functionality you are looking for.
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video

  • Validation for BAPI for transaction FV70 and FV75

    Hi all,
    Can any1 tell me Validation BAPIs for T-Codes FV70 and FV75.
    Please bear the following points
    1. The BAPI should NOT create Parked Customer Invoices, they should just validate that the data to create the customer invoice.
    2. The Transaction are used for CUSTOMER invoices NOt Vendor.
    3. I've searched SDN and I got the follwing BAPIs 
                  a. BAPI_INCOMINGINVOICE_PARK
                  b. MRM_INVOICE_PARK
                  c. MRM_PARKED_INVOICE_ACCDATA
    But they are all for Vendor Invoices and CREATE parking invoices, Both the things I do not want.
    If someone knows the name of the BAPI please forward to me at the earliest.
    Cheers
    Abhishek

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • Regarding BAPI output

    Hi,
       In my application, after giving input "SelectedRole" in one view and clicking submit button, it calls the following method which is in the custom controller.
    public void executeZbapi_Roles_Tcodes_Display_Input( )
        //@@begin executeZbapi_Roles_Tcodes_Display_Input()
         try {
              Zbapi_Roles_Tcodes_Display_Input bapiInput = new Zbapi_Roles_Tcodes_Display_Input();
              wdContext.nodeZbapi_Roles_Tcodes_Display_Input().bind(bapiInput);
              bapiInput.setRole(wdContext.currentContextElement().getSelectedRole());
                        wdContext
                             .currentZbapi_Roles_Tcodes_Display_InputElement()
                             .modelObject()
                             .execute();
                        wdContext.nodeOutput().invalidate();
                   } catch (WDDynamicRFCExecuteException ce) {
                        IWDMessageManager manager = wdComponentAPI.getMessageManager();
                        manager.reportException(ce.getMessage(), false);
        //@@end
    It executes a bapi and retrieves a table which is mapped to a table in another view in webdynpro.
      I am able to get the output for the corresponding input. But what the problem is when I go back to the first view and click submit again with the same input, the table contains all the values twice. Likewise how many times I am submitting, that many times its getting displayed in the table. Actually its getting added to the same table. What I needed is the table should get cleared everytime and then it should display the required output.
    How can I do this??
    Regards,
    Kalai

    Hi Bharath,
       I have done like what u said.  But still the same condition. I dint understand ur point clearly. Also I dint understand the concept of invalidating the Model Node. Can u explain me in detail??
        This is what I did.
    <b>(In FirstView)</b>
    wdThis
                                       .wdGetSampleModelCust0Controller()
                                       .executeZbapi_Roles_Tcodes_Display_Input();
                                  wdThis.wdFirePlugToSecondView();
    <b>(In Custom Controller)</b>
    public void executeZbapi_Roles_Tcodes_Display_Input( )
        //@@begin executeZbapi_Roles_Tcodes_Display_Input()
         try {
              Zbapi_Roles_Tcodes_Display_Input bapiInput = new Zbapi_Roles_Tcodes_Display_Input();
              wdContext.nodeZbapi_Roles_Tcodes_Display_Input().bind(bapiInput);
              bapiInput.setRole(wdContext.currentContextElement().getSelectedRole().toUpperCase());
                        wdContext
                             .currentZbapi_Roles_Tcodes_Display_InputElement()
                             .modelObject()
                             .execute();
                   } catch (WDDynamicRFCExecuteException ce) {
                        IWDMessageManager manager = wdComponentAPI.getMessageManager();
                        manager.reportException(ce.getMessage(), false);
        //@@end
    <b>(In Second View)</b>
    public void onActionBackToR3View(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    Zbapi_Roles_Tcodes_Display_Input bapiInput = new Zbapi_Roles_Tcodes_Display_Input();
                   wdContext.nodeZbapi_Roles_Tcodes_Display_Input1().bind(bapiInput);
                wdContext.nodeZbapi_Roles_Tcodes_Display_Input1().invalidate();
              wdThis.wdFirePlugToFirstView();
    Can u explain me in detail: why we have to bind the node to a new BAPI object?

  • BAPI output column names are not meaningful. How to change it?

    Hi Experts
    The custom BAPI's output has the the table field names as its column headings. So it is difficult to understand. How can I replace them with meaningful headings for each column? For that, is there any way without creating another output structure?
    Exple:
    Now it is like:
    VBELN   POSNR  MATNR ....
    I want to replace as:
    SD#  ITEM#  Material .....
    Thanks
    BD

    you need to replace the items that are seen in IMPORT / EXPORT / TAbles tabs when u open the BAPI in Se37 Tr.
    Before that make sure you hit a where used list on the FM name... amd make sure no one is using it... else u might screw some thing up.

  • How to export from VC a bapi output table to a PDF file

    Hello,
    How can I export a output table results from a BAPI (not BI Query) to a PDF file?
    Regards

    Hi
    There is very simple way of exporting the data to PDF. Follow the steps -
    1. Download PDF convertor on your machine.
    2. Create one button 'Convert to PDF' in your VC model.
    3. IN this button assign system command as 'Print'
    4. Save & Execute the model.
    After execution when you will click on this button, it will open normal print pop up window. Here you will find PDF convertor. Select this & Convert to PDF.
    Regards
    Sandeep

  • Soap - Xi - Bapi (different)(not able to see output)

    hello
    Firstly thank to Tuhin & Venkataramanan
    In reference to my early question dated  Posted: Dec 15, 2006 7:59 AM
    /people/community.user/blog/2006/10/24/exposing-bapi-as-web-services-through-sap-xi
    --  web service request to XI ,than XI call a BAPI  ,and the output of BAPI is sent back to web service responce.--  I am using Altova XML Spy to send a web service request ,& getting responce.I had done all configuration in IR, ID.
    As i send a request,through Altova XML spy ,and getting a responce to.  but in responce
    the BAPI Output Data is absent ,only element tags shows zero,
    ex-- <customer salary> <b>0</b> </customer salary>
    it should have some value i.e.  like 2300 ,which BAPI is giving 
    <u><b>Every thing is working</b> </u>In <b>Itegration monitering-> adapter (RFC)  status green</b>
    the massage is---
    BAPI name is -- <b>BAPI_AR_ACC_GETPERIODBALANCES</b>
    Text
    BAPI_Cchannel Receiver channel 'BAPI_Cchannel' for party '', service 'account2service' (internal name 'RfcClient[BAPI_Cchannel]')
    Client data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=800, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=guest, jco.client.sysnr=00, jco.client.ashost=192.168.100.21}
    Repository data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=800, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=guest, jco.client.sysnr=00, jco.client.ashost=192.168.100.21}
    Current pool size: 0, max pool size : 1
    RFC_HISTORY
    - OK: 2006-12-20 10:06:09 IST: Message processed for interface BAPI_AR_ACC_GETPERIODBALANCES
    - OK: 2006-12-19 22:37:20 IST: Message processed for interface BAPI_AR_ACC_GETPERIODBALANCES
    In <b>SXMB_MONI staus flag is processed succesfully</b>
    there in payload ,the out put is there but with the same empty tag ,which i am getting in
    as responce in Altova xml spy, as described earlier
    there is no mapping exception
    <b>I am not able to locate the error</b>
    Might be some different mapping required for BAPI Responce to WEBservice responce or else.
    Thanks & Regards
    Ashutosh

    Hi,
    Try to execute that BAPI in R3 first.
    If u r passing input from XI to BAPI in R3 some number input fields should be preceeded by zeros(means from ur soap request message).
    eg if ur vendor no is 169 then u should preceed it with 7 zeroz as vendor no. ia a 10 digit no.
    eg 0000000169.
    In ur bapi if u r passing any no. then preceed it with required zeros(it is required if u r passing data from XI but not in case of R3 BAPI execution).
    Then test ur response message in ur response mapping.
    Thanks.
    And then check

  • Output message from XI Validations aganist Schma?

    Hi,
       My scenario is such that whenever a message is outputted by XI it must be validated aganist the schema.I am using XSL mapping in interface mapping. By default the output message is not validating aganist the output schema. As per the suggestions ( for validations ) I done message mapping using graphical mapping editor from source to target. So in interface mapping for Source and target I used two maps one with Message mapping ( graphical) and then XSL mapping. When I am using this type scenario my target file which is a xml file looking like this
    <?xml version="1.0" encoding="UTF-8" >
    10023 UNITED STATES TECHNICAL
    But actually when I am using single mapping either Message Mapping using ( Graphical) OR XSL. The output XML file looks like this.
    <?xml version="1.0" encoding="UTF-8" >
    <empno>10023<empno>
    <country> UNITED STATES</country>
    <team> TECHNICAL </team>
    which is a correct one. Can anybody suggest to me how to rectify this? I am using mapping (graphical) previous to XSL mapping purely bcoz of XSD validations.
    Thaks & Regards,
    MM.Rao

    Hi Malisetti
    A message mapping between the same message types does <i>not</i> validate your messages. It merely makes sure that all mandatory elements are present in the target structure. If you're interested in full XML Schema validation, you might find some inspiration in this weblog entry written by myself:
    <a href="/people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema">/people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema</a>
    Cheers,
    Morten Wittrock

  • How to send output of one Bapi to another Bapi??

    dear all,
               I am having two BAPIs. From one Bapi I am getting value(Output) in one dropdown box.
               Now my problem is how to give output of first BAPI(in drop down box) as input to second BAPI which should display in second drop down.
                Am I clear???
                I have two drop down boxes and two BAPIs. I am able to get output of first BAPI into first drop down box. Now i have to use the data in first drop down box as input to second BAPI(second drop down box).
                The second BAPI takes first BAPI output as its Input.
                As I am new to Web Dynpro please help me in this regard detailly.

    Hi Pradeep,
    Consider you have dropdown1 displays all the countryNames which is output of BAPI1..
    Now you want to input this to BAPI2.Am i right ?
    If so
    1. create model instance of BAPI2 as you did for BAPI1.
    2. get the value from outputnode of BAPI1 by
        wdCOntext.outputNode().getXXX()
        and set this value to the input model  instance of BAPI2 and call execute method on the model.
    Regards, ANilkumar

  • Avoid empty validation on DropdownByKey

    Hi!
    How to avoid the unwanted validation of blank entry selection, created by the framework, when rendering a Dropdown on Web Dynpro Mobile?
    The problem is:
    - We have a Dropdown UI element bounded to a list from BAPI output table;
    - On the application, the user selects a value and fires any action, by pressing a button or something;
    - Then he remember that this field ought to be empty and select the blank entry;
    - On firing any other action, even a roundtrip to the server, a validation occurs, with error message like "Value ' ' not on the enumeration range"...
    Is there a solution on this?
    Ps: We are using WindowsMobile5 devices.

    Quick question, what is supposed to happen if the user never selects anything from the list? Is a selection manditory?

  • Filtering the data in BAPI

    Hi,
        we are using bapi_PRODORDCONF_GETDETAIL to fetch some data in a transaction. For this we have to use a condition that it should display records only from plant 1000. for this I'm trying to use genericfilterandsort action filter the results. But the problem is that when I'm trying to map it to output of repeater or the bapi output, The filter columns are not being displayed. I've tried to link also, but its of no use. I've tried conditional statement too... but din't work either.... can anyone help in this scenario???
    thanks

    Huh
    Well, would any of these 2 ideas help to get ur required result -
    1> In the SAP System, with help of ABAP (if u know, otherwise let some ABAPer do)develope a new FM (Function Module) which will call the FM <b>BAPI_PRODORDCONF_GETDETAIL</b> to get required order details on plant selection, where plant selection will be created as an input parameter for that newly developed FM.
    Then in BLS, use that new FM as RFC which in turn has a request item as Plant, which will be passed as input parameter and get response from RFC. that will be ur expected result.
    2> Just use <b>BAPI_PRODORDCONF_GETDETAIL</b> as RFC in BLS using JCO Interface Action to get the result of all order details. Then loop this result using Action <b>Repeater</b> with item of the table which returns all the details as XPath Target of Repeater (in Configure Object). In this loop, use <b>Conditional</b> Action to check the transaction input parameter (plant) with the plant item in the Repeater, Then use <b>Row</b> Action to append the satisfied items from Repeater to the XML Document (it must be defined initially with required column names to be displayed as output in the BLS)
    Regards
    Som

  • How to Output data in vertically from a horizontal format.

    Hello
    I have some difficulties how to display my data in my output table. I am greatful for
    every tips provided. The data in my it_tab is in a horizontal format but I want to
    display this data vertically in my output_tab.
    My it_tab looks like this:
    table: it_tab
    id   date   amnt
    011  2007   1200
    011  2008   1400
    011  2009   6700
    011  2010   3500
    012  2007   ---
    013  2007   3000
    013  2008   1300
    014  2007   1200
    014  2008   ---
    014  2009   9000
    015  2007   2500
    I would like my output_tab should look like this:
    table: t_output
    id  name  date amnt  date1  amnt1 date2  amnt2 date3  amnt3
    011 jx    2007 1200  2008   1400  2009   6700  2010   3500
    012 tx    --
    014 gx    2007 3000  2008   --    2009   9000   --    ---
    015 hx    2007 2500
    t_output already has some data init like id and name.
    This is what I have done but I don't output all the data as I want.
    clear w_output.
    loop at t_output into w_output.
    clear w_itab.
    loop at it_tab into w_itab where id = w_output-id.
    case sy-tabix.
    WHEN '1'.
    w_output-date = w_itab-date.
    w_output-amnt = w_itab-amnt.
    WHEN '2'.
    w_output-date1 = w_itab-date.
    w_output-amnt1 = w_itab-amnt.
    WHEN '3'.
    w_output-date2 = w_itab-date.
    w_output-amnt2 = w_itab-amnt.
    WHEN '4'.
    w_output-date3 = w_itab-date.
    w_output-amnt3 = w_itab-amnt.
    endcase.
    endloop.
    modify t_output from w_output.
    endloop.
    Could some body please tell me how to do this? I think many people in here have come
    across this type of problem before.
    Thank you all for helping out.
    Nadin

    Hi, Nadin!
    I suggest you to create a dynamic internal table with variable number of columns. You can do as follows:
    1. Create basic fieldcatalog for ALV list (or object) output
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
              EXPORTING i_structure_name       = 'ZYOUR_BASIC_STRUC'         
              CHANGING  ct_fieldcat = lt_fcat.
    2. Determine max number of columns (that is, max number of dates for each ID)
    SORT it_tab BY id.
    LOOP AT it_tab INTO is_tab.
      AT NEW id.
        ADD 1 TO l_count.
      ENDAT.
      AT END OF id.
        IF l_count > l_max_count.
          l_max_count = l_count.
        ENDIF.
        CLEAR l_count.
      ENDAT.
    ENDLOOP.
    3. Add one entry to fieldcat for each column
    DO l_max_count TIMES.
      l_index_char = sy-index.
      CONCATENATE 'DATE' l_index_char INTO ls_fcat-fieldname.
    *... other fieldcat fields, like texts etc.
      APPEND ls_fcat TO lt_fcat.
      CONCATENATE 'AMNT' l_index_char INTO ls_fcat-fieldname.
    *... other fieldcat fields, like texts etc.
      APPEND ls_fcat TO lt_fcat.
    ENDDO.
    4. Create dynamic table from fieldcat using:
    DATA: dt_outtab TYPE REF TO data. "IMPORTANT: make this declaration global, otherwise error
    FIELD-SYMBOLS: <table> TYPE STANDARD TABLE.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
           EXPORTING it_fieldcatalog = lt_fcat
           IMPORTING ep_table        = dt_outtab.
    ASSIGN dt_outtab->* TO <table>.
    5. Fill this table. To do this you need special techniques since you have a generic table with no static structure. For example:
    FIELD-SYMBOLS: <line>  TYPE ANY,
                   <field> TYPE ANY.
    DATA: l_field_inex TYPE i.
    LOOP AT it_tab INTO is_tab.
      AT NEW id.
        APPEND INITIAL LINE TO <table>.
        READ TABLE <table> INDEX sy-tfill ASSIGNING <line>.
        l_field_index = 3. "you start from 3rd field - #1 is ID, #2 is NAME
      ENDAT.
      ASSIGN COMPONENT l_field_index OF STRUCUTRE <line> TO <field>.
      <field> = is_tab-date.
      ADD 1 TO l_field_index.
      ASSIGN COMPONENT l_field_index OF STRUCUTRE <line> TO <field>.
      <field> = is_tab-amnt.
      ADD 1 TO l_field_index.
    ENDLOOP.
    6. Display your report in alv. You have valid fieldcat and output table which is created dynamically.
    CALL METHOD o_alv->set_table_for_first_display
              CHANGING  it_outtab       = <table>
                        it_fieldcatalog = lt_fcat.
    If you don't use ALV object but rather ALV list, it's similar. Just use corresponding functions for ALV creation and list display.
    Note that this is not a tested code. Just an idea to help you procede.
    <b><REMOVED BY MODERATOR></b>
    HTH.
    Regards,
    Igor
    Message was edited by:
            Alvaro Tejada Galindo

  • KeyExpansionR3 - can't get the fields of BAPI

    Hello,
    i use a R3 Key Expansion in my Scenario.
    It does work so far but i have a problem to geht these informations in my Idoc to fill my fields in ObjectRole 'R'.
    Here you can see my Idoc:
    - <b1im:B1IMessage ...">
    + <b1im:Header>
    - <b1im:Body>
    + <b1im:Payload ObjectTypeId="Z.ECC6.0_CLFMAS02" ObjectRole="S">
    - <b1im:Payload ObjectTypeId="B1.8.8_LSTSCHLD" ObjectRole="SA">
    - <ZSD_GETDATA xmlns="urn:sap-com:document:sap:rfc:functions">
    - <LSCHILD>
      <MANDT>100</MANDT>
    and in my bizstep.xsl i want to get this data from my Idoc:
    <xsl:value-of select="/b1im:B1IMessage/b1im:Body/b1im:Payload[@ObjectTypeId=&apos;B1.8.8_LSTSCHLD&apos;]/ZSD_GETDATA/LSCHILD/MANDT"/>
    The Path seems to be correct. I think I have a problem with xmlns="urn:sap-com:document:sap:rfc:functions"?
    Does anybody has a R3Keyexpansion and can help me? Thank you.
    Edited by: Gerrit Berberich on Sep 10, 2010 10:35 AM

    the solution is to write 'rfc' (namespace) before the fieldnames of bapi-output:
    <xsl:value-of select="/b1im:B1IMessage/b1im:Body/b1im:Payload[@ObjectTypeId=&apos;B1.8.8_LSTSCHLD&apos;]/rfc:ZSD_GETDATA/rfc:LSCHILD/rfc:MANDT"/>
    Edited by: Gerrit Berberich on Sep 15, 2010 8:08 PM

  • SUP 2.2.5 + Offline BAPI Error Handling

    Dear All,
    Following is my Offline Transaction scenario where I require help.
    Use Case:
    MBO created on a Z BAPI that is Creating a GR (Goods Receipt) in SAP ERP. BAPI output contains Error Return Table as well that helps us in finding any error that is thrown from SAP.
    Successful Scenario:
    We create one GR in offline mode and call create() and submitPending() method of the MBO. When connected again and SYNC, it successfully CREATE the GR if there is no Error and I will get a new Document Number. Also, it returns error in Error Return Table if there is any error. We get it by calling the findAll() method on the MBO.
    Problem Scenario:
    We create two or more GRs in offline Mode and call create() and submitPending(). Now Sybase Unwired Platform has two pending Items. When connected again and SYNC, it only returns the LAST successful OR unsuccessful GR record in the findAll(). We lost the other items statuses. We might get the successful items from GR_LIST MBO but any pending items that has ERROR will be lost.
    Is there any way in SUP that I can individually Sync pending items OR get the status of all Pending items after Sync?
    Is this a default behavior of SUP that it flushes all the pending Items at once and ONLY returns the last item status in the Original MBO?
    Looking forward for a quick and favorable response.

    The MBO operations output is is not supported in SUP. Given below discussions gives more information , SUP operations cant get return / output parameter for HWC ?
    How to create SUP native application
    An alternative solution that I can give you:
    Create an MBO using the BAPI used for operation, do not create an operation.
    Keep the input and output of MBO/BAPI as tables (stuctures).
    Call synchronize("sync_grp"); whenever you want to do operation, hence the operation RFC will be called. Make sure you are keeping this MBO in a separate sync group. Pass the input of the operation to the table using personalization keys. ie create PK of table/structure type and fill PK before sync from  mobile.
    Before making a sync call check whether device has internet connectivity. If there is no connectivity store the user entered values locally in device (ex. in SQLite). Keep a button to sync pending operations when the device comes online by the user.
    If the device is online do the sync. After successful sync make a findall query to get the output of operations. Since the output is a table all operations output messages can be found. In the BAPI output table keep a column for success/failure, based on that operation results can be identified.
    Midhun VP

Maybe you are looking for