How to trap the two function code in the bdc

Dear All,
I have a bdc program now i need to pick up function code based on some condition. means if some condition then goto one function code and else don't go. I tried it but not working. It is working in shdb but not in the program.
eg.
    if not zcontract_no is initial.
       perform bdc_dynpro using 'SAPMZW_CREATE_SALES_ORDER_STD'
                                '9000'.
       perform bdc_field using 'BDC_CURSOR'
                                    'P_CONTRACT'.
        perform bdc_field using 'BDC_OKCODE'
                                <b>'=COPY'.</b>
      endif.
perform bdc_field using 'BDC_OKCODE'
                                <b>'=SUBMIT'</b>.
Please suggest.
Regds,
Anup

Hi ,
    In your second case u r not specifying the BDC DYNPRO screen number , your code should be
if not zcontract_no is initial.
perform bdc_field using 'BDC_OKCODE'
'=COPY'.
else..
perform bdc_field using 'BDC_OKCODE'
'=SUBMIT'.
endif.
Kunal

Similar Messages

  • How to get the partner function code by partner function?

    For example, I need to know the partner function code for 'Reported By' and it's 'SLFN0002', How can I get this information by abap code?
    Best regards,

    Hey Blake,
    You can look up CRMC_PARTNER_FT( Db table ) which is used in the above  maintainance view...
    Use select stmt to populate an internal table.. then use Read Table( which key DESCRIPTION = < Sold to party > and so on...
    Just Get an Abaper and things would be easy..
    Reward points for usefull posts..
    Regards,
    Anand

  • How to change the Partner function code in Quotation

    Hi All,
    We have a requirement that whenever a Quote is cancelled,
    We need to change one of the function codes in the partner tab and also the user status should be changed.
    Can anyone give a quick solution on this?
    Your response will be appreciated.
    Thanks in advance.
    Regards,
    Ramya

    You will best implement this as an action (tx. SPPFCADM), which is called on changing the status to cancelled. In this action you can call a function module changing the partner functions using e.g. CRM_ORDER_MAINTAIN as the appropriate function module.
    Regards, Kai

  • How to connect our outbound function module to the message type

    how to connect our outbound function module to the message type any transcation code exits to assign the message type with the function module .
    Thank in advance .
    A. Thiru

    Hi Thiru,
    Standard Transaction Codes, have their own Function Modules for generating Outbound/Indbound Idocs. Where these Function Modules will be configured to a particular Process Codes.
    For E.g for PO's
    Process code : ME10 - IDOC_OUTPUT_ORDERS - for creation
    In case if its a Z Function Module, It depends on the case how you use IDOC types. either directly through Z Program or through Inbound/Outbound Process  codes with respective Function modules.
    Regards,
    Anbalagan

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • How can I turn off Recently Websites when opening new Safari window? After tapping on the two overlapping boxes on the bottom right of Safari, a new blank window appears with Favorites, but now in iOS 8, recently viewed websites are listed.

    How can I turn off Recently Visited Websites when opening new Safari window?
    After tapping on the two overlapping boxes on the bottom right of Safari, a new blank window appears with Favorites, but now in iOS 8, recently viewed websites are listed. How can I turn this function off? I do NOT want my new Safari windows to have history displayed of previous websites I visited. I only want my Favorites (on the top) to be displayed. Please help.
    Thank you for your time, patience, understanding, kindness, and concern.

    Thanks for replying, but that isn't the answer I am looking for.  Also, there is no + sign, UNLESS you do tap the overlapping boxes.
    Let me try to ask my question a little more clearly:
    When I tap the two overlapping boxes on the lower left (the option to Open New Windows), the new Window that appears will show your Bookmarked FAVORITES. But with my new iPhone 6, and the new iOS 8.0.2, when I tap the two boxes to open a New Window, my Bookmark Favorites show (as they always have and should), but below them, there is a dividing line underneath them, and it says Recently Viewed Websites, and has these websites available to tap.
    So my question is, HOW DO I TURN THESE OPTION OFF?
    *UPDATE  (10.13.14): Since I have asked this question, I no longer see these Recently Viewed Websites under my Bookmarked Favorites in my new Window tabs. So I hope that Apple fixed it, or somehow it was a mistake, or somehow I changed an Option on my iPhone 6 that stopped this for reoccurring.
    Thank you for your help bobseufert! I appreciate your concern, kindness, and the time to try to help. I am grateful.
    Have a blessed day.

  • How can I get a file to copy all of the files in a directory except itself and the source of the copy function will be the directory the final program is in?

    How can I get a file to copy all of the files in a directory except itself and the source of the copy function will be the directory the final program is in? This application must be in Lab View 8.

    you mean something like this (see below)?
    Now you may have to implement code to check if the destination folder exists and to create it, etc.  But if you use the Front Panel Control to select the destination folder, it should be okay.
    Not the best implementation, mind you but you'll get the idea..
    Message Edited by JoeLabView on 04-18-2007 03:43 PM
    Attachments:
    copy folder contents.PNG ‏10 KB

  • I cannot determine how to utilize the voice function while in the fitness workout area. On rare occasions it works with a voice summary of my workout and a new summary screen. would appreciate help

    I cannot determine how to utilize the voice function while in the fitness mode. On one or two occassions it worked but I do not know how it was activated. It gives a voice summary and new summary screen for the workout.

    Hi shiva
    Thanks for your help,
    Can you check this coding and revert me back ASAP Please.
    REPORT BDS_GOS_CONNECTION.
    DATA : logical_system LIKE BAPIBDS01-log_system.
           CLASSNAME LIKE BAPIBDS01-CLASSNAME
           OBJKEY LIKE SWOTOBJID-objkey.
    PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
                pa_class like BPIBDS01-CLASSNAME,
                pa_objkey like swotobjidobjkey.
    AT SELECTION-SCREEN.
    CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
             EXPORTING
                  bor_id             = bor_id
             IMPORTING
                  logical_sytem      = pa_lo_sys.
                  classname          = pa_class.
                  objkey            = pa_objkey.
             EXCEPTIONS
                  no_objects_found     = 1
                  internal_error       = 2
                  internal_gos_error   = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    clear v_attno1.
    i_object1-typeid = 'BUS2012'.
    i_object1-catid  = 'BO'.
    i_object1-instid = i_yItem-docno.
    call method cl_gos_attachment_query=>count_for_object
       exporting
        is_object = i_object1
        ip_arl    = space
       receiving
        rt_stat   = i_stat1.
    read table i_stat1 into wa_stat1 index 1.
    if sy-subrc eq c_0.
        move wa_stat1-counter to v_attno1.
    endif.             
    CALL METHOD cl_gos_attachment_query=>count_for_object
    EXPORTING
    is_object = object
    ip_arl =    space
    RECEIVING
    rt_stat = lt_stat.
    READ TABLE lt_stat INDEX 1 into ls_stat.
    count = ls_stat-counter.
    *The object has to be a concatenation of your document, like this:
    CONCATENATE object-instid tab-gjahr INTO object-instid.
    ELSE.
    CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
    object-instid.
    ENDIF.

  • How many times can you install Lightroom 5? My problem is that I have saved my programs on C. To I have more space, I want to save my programs now on E. Can I now uninstall Lightroom and reinstall from C to E? Can I use the same license code as the first

    Please help!!
    How many times can you install Lightroom 5? My problem is that I have saved my programs on C. To I have more space, I want to save my programs now on E. Can I now uninstall Lightroom and reinstall from C to E? Can I use the same license code as the first installation?

    Thank you for your answers, it helps me a lot.
    But sorry for my ignorance. I understand how you mean it, but I don't know how to do it. I'm scared to lose the settings/edits of the images.

  • How to sync with two computers not at the same time, I'm registerd with one computer

    How to sync with two computers (not at the same time), I'm registered with one computer and am trying to connect with second computer with same iPhone. To sync the first time with the second PC "Firefox Sync Option tells me Create New account or Connect, when I connect it gives me a Passcode and on iPhone it also gives me a Passcode, than how do I connect? Both the iPhone and PC gives me a Passcode and have now idea what to do with them.
    Where do I find my Sync Key ? so I can install manually if it works ?

    Use the Sync Key ''(Recovery Key)'' from the PC that you used to initially setup your Firefox Sync service, when setting up that 2nd PC with Sync. You need to use '''Add a device''' to setup the 2nd and subsequent devices on a Sync account. <br />
    https://support.mozilla.com/en-US/kb/add-a-device-to-firefox-sync

  • How do i sync two different ipads to the same computer, but maintain two seperate list of apps?

    How can I sync two seperate ipads to the same computer without the apps from one ipad being loaded on the other?

    Do this for each device. You can do this with all iTunes content as well. Apps, music, photos, books, movies - everything. You can have unique content on all of your devices.
    You may also want to turn off auto sync so that you do not have to wait for the iPad to sync and then go back and make these changes.
    Launch iTunes and go to Edit>Preferences>Devices - check the box at the bottom.... Prevent iPods, iPhones ....
    Then set up your sync preferences like this using Apps as the example.
    Connect the iPad to the computer and launch iTunes.
    Click on the iPad name on the left side under devices.
    Click on the Apps Tab on the right.
    Click on all of the apps that you want to sync to that iPad
    Click on the Sync Apps Heading.
    Click on Apply in the lower right corner of iTunes
    You may want to uncheck Automatically Sync New Apps under the Sync Apps list

  • How to find out the inbound function module in the extended idoc

    Hi,
    how to find out the inbound function module in the extended idocs
    Thanks .

    through we41/we42 you can find the inbound function module.......
    or
    thorough we19(idoc test tool) ....
    give the input as message type or basic idoc..
    press exec...
    then you can find th button on application tool bar as inbound funtion module....
    from here also you can find..........
    <REMOVED BY MODERATOR>
    Khasimsa
    Edited by: Alvaro Tejada Galindo on Apr 14, 2008 1:34 PM

  • Write two functions to find the the number of elements in a linked list?

    I am trying to Write two functions to find the the number of elements in a linked list. One method using recursion and One method using a loop...
    //The linked List class is Represented here.
    public class lp {
    public int first;
    public lp rest;
    public lp(int first1, lp rest1)
    first = first1;
    rest = rest1;
    The program i wrote so far is
    import java.util.*;
    import linklist.lp;
    public class listCount{
    //loop function
    public static void show_list(lp list)
    int counter = 0;
    while(list != null)
    list = list.rest;
    counter++;
    System.out.println ("length computed with a loop:" + counter);
    //recursive function
    public static int recursive_count(lp list)
    if (list.first == null)
    return 0;
    else
    return recursive_count(list.rest) + 1;
    //main method
    public static void main (String args[])
    lp list1 = new lp(1, new lp(2, new lp(3, null)));
    show_list(list1);
    System.out.println("length computed with a recursion:" +
    recursive_count(list1));
    at the if (list.first == null) line i get the error " incomparable types:
    int and <nulltype>" I know this is a beginners error but please
    help...What should I do?

    byte, char, short, int, long, float, double, and boolean are primitives, not objects. They have no members, you cannot call methods on them, and they cannot be set to or compared with null.

  • GST,HST and PST-How to report the canadian tax codes in the expense report?

    Hi,
    we are implementing SAP T&E for Canada and we have a requirement regarding with the Canadian taxes.
    The taxes calculation for Canada will not be done in SAP FI. This tax calculation it will be done in another solution, out of SAP.
    What Travel Management have to guarantee is when the posting is done the taxable amounts are transferred to fields XREF1 and XREF2 of the finance document.
    What we would like to know is:
    1) when the traveler is entering his receipts, he has to insert at least all the possible combinations of the GST/HST/PST using the field VAT code. The field VAT code is enough or another field will be necessary?
    2) when the posting is done the taxable amounts are calculated and transferred to the required fields XREF1 and XREF2 (BaDI). These two fields are enough or it will be necessary another one, as we have three taxe types (GST, HST, PST)??.---
    In Canada , i think that we can have only HST or GST/PST and depending on the provincies we can have one method or the the other and only the values for PST are differents.
    Could you please help?
    Thanks and Regards,
    Teresa Laia Cardoso

    Hi Francis,
    Check the BADI "TRIP_WEB_CHECK" method "USER_CHECK_GENERAL_DATA".
    Here based on the schema you can modify the "estimated cost" field.
    Hope it helps.
    Regards,
    Jyothi

  • Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    iTunes Store: Invalid, inactive, or illegible codes
    http://support.apple.com/kb/TS1292

Maybe you are looking for