DISCVR PARAMETER -- LOV ON DESC BUT RETURN CODE VALUE

HOW DOES ONE IN DISCVR PARAMETER DIALOGUE CREATE A PARAMETER (SIMILAR TO ORACLE REPORT BUILDER, PICK CODE AND DESC -- HIDE FIRST COLUMN) WHERE THE
USER SEES THE CODE DESCRIPTION IN THE LOV BUT THE CORRESPONDING CODE VALUE IS WHAT IS RETURNED TO THE PARAMETER BIND VARIABLE ??

And now Version 2.
I didn't put this into the 1st post as the formatting goes bonkers.
#>> Start of VERSION 2
  call function 'MY_FUNCTION_MODULE'
       destination RFCDEST
       starting new task 'taskname'
       performing receive_result on end of task
       tables
            orders_list          = t_orders_packet
            apo_orders_list      = t_apo_orders
            apo_resources        = t_apo_resources
       exceptions
            COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
            SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
            NO_ORDERS_SUPPLIED       = 3
            NO_PEGGED_ORDERS_FOUND   = 4
            ORDERID_CONVERSION_ERROR = 5
            OTHERS                   = 6.
  WAIT UNTIL results_received = 'X' UP TO 60 SECONDS.
if sy-subrc is initial.   << Now this is always ZERO
  * do some stuff as RC was 0
else.
* log non-zero return code etc
endif.
FORM receive_result USING iv_taskname.
  RECEIVE RESULTS FROM FUNCTION 'MY_FUNCTION_MODULE'
       tables
            orders_list          = t_orders_packet
            apo_orders_list      = t_apo_orders
            apo_resources        = t_apo_resources
       exceptions
            COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
            SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
            NO_ORDERS_SUPPLIED       = 3
            NO_PEGGED_ORDERS_FOUND   = 4
            ORDERID_CONVERSION_ERROR = 5
            OTHERS                   = 6.
  results_received = 'X'.
endform.                    "receive_result
* < End of Version 2

Similar Messages

  • Return Code value using 'starting new task' and 'wait until'

    I'm having a minor issue with some return code values in my ABAP.
    This is what part of it used to look like before I modified it:
    With Code in version 1, the sy-subrc was not always zero, sometimes it would be 4.
    That was fine, and my abap would do something based on the non-zero RC.
    had a need to implement an RFC timeout, the only way I could see to do it was to use 'starting new task' etc as seen in Version 2.
    However, with my changes, sy-subrc is always zero.
    The ABAP runs fine but I know that sy-subrc should sometimes be 4, even when it returns within the allotted 60 seconds.
    Maybe I've coded it incorrectly.
    Can someone point me in the right direction?
    #>> Start of VERSION 1
      call function 'MY_FUNCTION_MODULE'
           destination RFCDEST
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
    if sy-subrc is initial.
      * do some stuff as RC was 0
    else.
    * log non-zero return code etc
    endif.
    * << End of Version 1

    And now Version 2.
    I didn't put this into the 1st post as the formatting goes bonkers.
    #>> Start of VERSION 2
      call function 'MY_FUNCTION_MODULE'
           destination RFCDEST
           starting new task 'taskname'
           performing receive_result on end of task
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      WAIT UNTIL results_received = 'X' UP TO 60 SECONDS.
    if sy-subrc is initial.   << Now this is always ZERO
      * do some stuff as RC was 0
    else.
    * log non-zero return code etc
    endif.
    FORM receive_result USING iv_taskname.
      RECEIVE RESULTS FROM FUNCTION 'MY_FUNCTION_MODULE'
           tables
                orders_list          = t_orders_packet
                apo_orders_list      = t_apo_orders
                apo_resources        = t_apo_resources
           exceptions
                COMMUNICATION_FAILURE    = 1 MESSAGE MSG_TEXT
                SYSTEM_FAILURE           = 2 MESSAGE MSG_TEXT
                NO_ORDERS_SUPPLIED       = 3
                NO_PEGGED_ORDERS_FOUND   = 4
                ORDERID_CONVERSION_ERROR = 5
                OTHERS                   = 6.
      results_received = 'X'.
    endform.                    "receive_result
    * < End of Version 2

  • LOV problem ... returning display-value and not key-value

    Hi. Sorry for my broken English.
    I have a problem with pop-up dynamic LOV.
    I have a simple form called Form A containing item_code and item_name. Users can create, update and delete new item by using this form.
    Another form called Form B has a field called item_code, and the item_code field is a dynamic pop-up LOV field and a query for this LOV is like this;
    select item_name d, item_code r from item_master order by item_code;
    When i create the new record in Form B and use LOV to find and get the item code, LOV works fine
    and it returns key-value to the item_code field.
    But when i try to update the record (I have a link from report page to Form B), value of the item_code field is not the key-value from LOV, but is a
    display-value from LOV.
    Any ideas?
    Thank you.

    Well, from what you have described, this is working exactly as it should. Form B's LOV is intended to retrun the key value but should show the dispaly value. When you go from the report to the form, the key value is being passed (or should be depending on your code) and Form B ought to show the display value.
    So, in short, I would say that Apex is doing what it should. Unless I misunderstand something.
    Bruce

  • Single RFC Lookup should return multiple values - but returns no values

    I have an RFC Lookup in my PID system that i had to change due to a test defect.
    the FM i wrote was working on a single value and returning the correct entry...  however it now needs to return multliple entries and map 0..unbounded....
    i have made the changes, the FM works in ECD, however when i call the FM from the mapping, it does not return any values...  now, i am asking my basis team to change the PIAPPLUSER to dialog user so i can throw a breakpoint for an external user... 
    has anyone done a single to multi value mapping on lookup?  i am not sure that it is the FM that is incorrect as it is very simple code..   
    DATA: lt_jobtype TYPE zhr_lkupjobtype_t.
      CLEAR     lt_jobtype.
      REFRESH lt_jobtype.
      SELECT * FROM zhr_lkupjobtype
        INTO TABLE lt_jobtype
        WHERE zinterface_id = import-zinterface_id
        AND   zsap_jobtype  = import-zsap_jobtype.
      MOVE lt_jobtype TO export.
    is there a way of checking the RFC part of an message mapping?  i checked the full trace within graphical mapping but this shows no return....

    I am using a MOVE instead of APPEND.
    according to the keyword help if the tables are identical, you can use MOVE.
    it works when i test in SE37.
    i have tested it both ways and i get the same result each time.
    i even tried it this way:
      SELECT * FROM zhr_lkupjobtype
        INTO TABLE export 
        WHERE zinterface_id = import-zinterface_id
        AND   zsap_jobtype  = import-zsap_jobtype.
    and that works too to get the target values into the export table!  that's what made me think it was not the code as i have tried three different ways of writing the same code...  the Function Module works perfectly anyway!  but when it is called from PI i cannot see if any values are returned....

  • Htmldb_item(s) are null but return query values

    Hi,
    I have used the following query to create a region (I've done many like this).
    When I access the htmldb_application items in insert statements it works fine.
    But, when I try to do an update statement the htmldb_application items are null;
    even after returning & displaying the values on screen. Hope this makes sense.
    Region:
    Select x.establishment_name,
    x.hsd_insurance_policy_number,
    x.hsd_insurance_group,
    x.del
    from
    (Select
    htmldb_item.text(11,establishment_name,20) establishment_name,
    htmldb_item.text(12,hsd_insurance_policy_number) hsd_insurance_policy_number,
    htmldb_item.text(13,hsd_insurance_group) hsd_insurance_group,
    htmldb_item.hidden(14,hsd_person_insurance_id) hsd_person_insurance_id,
    htmldb_item.hidden(15,gen_establishment_id) gen_establishment_id,
    htmldb_item.hidden(16,gen_adr_id) gen_adr_id,
    htmldb_item.checkbox(20,gen_person_id) del
    from hsd_insurance_v
    where gen_person_id = :HSD_Per_Identifier
    union all
    Select
    htmldb_item.text(11,null),
    htmldb_item.text(12,null),
    htmldb_item.text(13,null),
    htmldb_item.hidden(14,null),
    htmldb_item.hidden(15,null),
    htmldb_item.hidden(16,null),
    htmldb_item.checkbox(20,null) del
    from all_objects where rownum < nvl(:P4300_ROWS3,2)) x
    Update Statement:
    Begin
    for i in 1..htmldb_application.g_f11.count
    loop
    If htmldb_application.g_f11(i) is not null Then
    Update HSD_PERSON_INSURANCE
    Set
    HSD_INSURANCE_POLICY_NUMBER = htmldb_application.g_f12(i),
    HSD_INSURANCE_GROUP = htmldb_application.g_f13(i),
    LAST_UPDATE_BY = :P4300_Updated_By,
    LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
    where
    hsd_person_insurance_id = htmldb_application.g_f14(i);
    Update Gen_Establishment_Entity
    Set
    ESTABLISHMENT_NAME = htmldb_application.g_f11(i),
    LAST_UPDATE_BY = :P4300_Updated_By,
    LAST_UPDATE_DATE = to_date(:P4300_Updated_Date,'DD/MM/YYYY')
    where gen_establishment_id = htmldb_application.g_f15(i);
    end if;
    end loop;
    end;

    Susan,
    In 1.5, htmldb_item.select_list_from_query didn't support "display extra values" behavior. Now it does and a tenth parameter (p_show_extra in varchar2 default 'YES') allows you to disable it with 'NO'.
    In your example, the query selects only non-null commisions, but setting p_show_null=>'YES' gives you the first null row and the default setting p_show_extra=>'YES' gives you the last null row, which is the "selected" option for rows where the comm column is null.
    Add ,NULL,NULL,'NO' to the function call to eliminate the unwanted row.
    Scott

  • Simple NOT EXIST but returns wrong values

    I have been doing this for a couple of month and this makes sense to me but I get the wrong answer.
    T1 contains 1 to 10
    U2 contains 1 to 5
    SELECT T1a.num
    FROM T1 T1a
    WHERE NOT EXISTS
    (select T2b.num
    from T1 T1b, U2
    WHERE T1b.num = U2.num
    GROUP BY T1a.num
    I expect to get 6 to 10,
    but am getting NO ROWS SELECTED.
    Ideas more than welcome

    You are trying to :-
    1. Use table T1 twice which is not needed
    2. In the inner sub-query, you are using column T2b.num
    alias 'T2b' is not defined, in which case you should be
    getting SQL Error
    (select T2b.num
    ERROR at line 4:
    ORA-00904: invalid column name
    Try This,
    1 SELECT T1a.num
    2 FROM T1 T1a
    3 WHERE NOT EXISTS
    4 (select Null
    5 from U2
    6 WHERE U2.num = T1a.num
    7 )
    8* GROUP BY T1a.num
    Test Db>/
    NUM
    6
    7
    8
    9
    10

  • Return multiple values for the popup LOV

    Hi folks,
    I have one challange. I have a search engine and there is an popup lov and its having three Display and 3 Retun value such as
    select
    p.A || ', ' || pi.B|| ', ' || km.C|| ' ' d, p.A || ', ' || pi.B|| ', ' || km.C|| ' ' r
    from tableA km,tableB p,tableC pi
    where km.col1=p.id and km.col1=pi.id and km.C is not null
    when i click on the pop lov it will display 3 values shuch as SAP+DBA+HR and in popup lov iteam its will return 3 values
    such as SAP+DBA+HR this return values are from 3 cloumn names from same table ie. A column, B column, C column
    and when i click on submit button this return values from 3 columns values should assign to the 3 column such as
    A=SAP, B=DBA and C=HR and search fetchs the result in a Report.
    Its some thing new, is it possible..:)
    ok will be waiting for your reply..:D
    Regards,
    Suri
    Edited by: user634694 on Feb 25, 2009 3:14 AM

    Hi Varad,
    am facing problems i wrote dynamic sql its working fine for 2 and 3 fields like (SAP+ORCL) and (SAP+ORCL+HRA) but for the single value like SAP the results are not comming properly. my code is
    If (:P25_TEST Is not Null ) THEN
    V_Sql := V_Sql||q'!
    And
    (multipleInstr1(R.Pillar,:P25_TEST)&gt;0 )
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Pillar))&gt;0 ) and
    ((multipleInstr1(R.Product_Line,:P25_TEST)&gt;0 )
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Product_Line))&gt;0) and
    ((multipleInstr1(R.Category,:P25_TEST)&gt;0 ) or (R.Category is null)
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Category))&gt;0 )
    End If;
    where multipleInstr1 is a function created to search results even its delimited by '+' it ignors '+' delimiter and
    :p25_test is the popup iteam which takes values like SAP+ORCL+HRA or SAP+ORCL or SAP how its possible to get this results.
    Its turning too complicated for cheking condetion for a single popup iteam, can we get any solution for this or not..
    Hope will do respond
    Thanks and Regards,
    Suri

  • LOV does not return the value (2)

    PPR in general does not work correctly if invalid HTML is generated. One example of an invalid HTML is having an opening <TD> tag immediately following another opening <TD> tag.
    After checking everything else, if LOV still does not return the value, test whether it's not a problem with the invalid HTML by placing the messageLovInput outside of the complicated layout nestings you may have. If it works outside of the layout nestings, look for the possible problems in the layout nestings.

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • Lov to return multiple values

    I had a made a dynamic query "Select empno,empname from emp",
    but it returns me only one value.In my main form i had 2 fields
    EMP_NO and EMP_NAME.
    How to get both the values through LOV.
    Any advice.
    Regards,
    aakash

    If your select statement is "Select empno,empname from emp" in the dynamic LOV you have created, then it means that the diaplay value is "empno" and the return value is "empname". Always, the first column selected is the display name and the second one is the return value for the dynamic LOV. You cannot return multiple values thru LOVs since forms will not accept currently. In your case, you need to have 2 LOVs... one for empno and the other for empname.

  • Return code 8 on OPEN DATASET

    Hi All,
    i try to migrate a file with ISU-Migration workbench.
    in the Display option I can see the file. All looks fine.
    When I press IMPORT I got the message "migration executed" but actually it did not read anysthing. So I debugged and came to the OPEN DATASET.
    There I get a sy-subrc of 8.
    Do not remember what this means...probably the directory is protected or something...
    Who knows?
    Thanks in advance
    Thomas

    hi Thomas,
         hi thomas u can  do authority check as stated below..
    if sy-subrc is 8 it means too many parameters (fields, values). Maximum allowed is 10. I have also added the other sy-subrc condition so that u can benifit...
         AUTHORITY-CHECK OBJECT object
        ID name1  FIELD f1
        ID name2  FIELD f2
        ID name10 FIELD f10.
    object
    Field which contains the name of the object for which the authorization is to be checked.
    name1 ...
    Fields which contain the names of the
    name10
    authorization fields defined in the object.
    f1 ...
    Fields which contain the values for which the
    f10
    authorization is to be checked.
    AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept).
    You must specify all authorizations for an object and a also a value for each ID (or DUMMY).
    The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.
    If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected.
    If the return code value in SY-SUBRC is 0, the user has the required authorization and may continue.
    The return code value changes according to the different error scenarios. The return code values have the following meaning:
    4
    User has no authorization in the SAP System for such an action. If necessary, change the user master record.
    8
    Too many parameters (fields, values). Maximum allowed is 10.
    12
    Specified object not maintained in the user master record.
    16
    No profile entered in the user master record.
    24
    The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.
    28
    Incorrect structure for user master record.
    32
    Incorrect structure for user master record.
    36
    Incorrect structure for user master record.
    hope i had answered u.. rewward if u find it useful.
    Regards,
    Rajkumar.G.

  • SY - System fields and return codes in ABAP

    Hi
    I'm new to ABAP, where do I find what the meaning of the system field return codes are ?
    example SY-SUBRC returns a number of codes 0, 2, 4, 8 etc what do they mean.
    Is there a resource somewhere that provides this information for all the system fields.
    I have searched high and low and have found little, they must be defined somwhere ?
    cheers Hugh

    Here is a listing of all of the system fields.
    http://help.sap.com/saphelp_scm50/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm
    As for what the return codes( 0, 4, 8) for SY-SUBRC mean,  that is a little tricky.  The meanings of the values are dependent on what statement was used previously. They would mean different things when used with different statements.  For example, if you check SY-SUBRC after a FIND statement, the return code value 4, would mean something different than if you had check the SY-SUBRC value after doing an OPEN DATASET.  So you need to look at the specific statements in help.sap.com and see what it says about the SY-SUBRC values for each statement.
    http://help.sap.com/saphelp_scm50/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Regards,
    Rich Heilman

  • Returning a value from a LOV to the main document

    Hi,
    I'm using jheadsrart with uix, I have a form with a LOV. When I chose a value in the LOV, I need to return another value from that LOV to a hidden field in my main document.
    How can I do that?
    Thanks for your help!
    Martin

    Hi Rohit,
    Just declare the two variables var1(variable for checking data) & var2(variable for counter) in your include program.
    Inside the include you can do the coding as under:
    IF VAR1 <condition for checking data>.
    VAR2 = VAR2 + 1.
    ENDIF.
    Now you can check the value of the variable VAR2 in the main program & call the desired function.
    Regards,
    Chetan.
    PS:Reward points if this helps.

  • HT1998 Why can't I uninstall AirPort 4.2 from my Windows 7 PC..  I downloading and reinstalling the 4.2 but during the installation process I get an error.  It reads...    "1608: Unable to Create InstallDriver instance Return Code -2147024894

    Why can't I uninstall AirPort 4.2 from my Windows 7 PC..  I tried downloading and reinstalling the 4.2 but during the installation process I get an error.  It reads...    "1608: Unable to Create InstallDriver instance Return Code -2147024894

    You should not install it again..
    Boot the computer into safe mode and try the uninstall again.
    No luck you will have to manually uninstall which is a pain. Delete the files and open regedit and delete the registry entries.. better still use the system restore to go back to a previous system where you had no 4.2 installed..
    Or just ignore it and install the latest 5.6.1 and if it gives trouble well do a clean install of windows.

  • XPRA_EXECUTION. TP_STEP_FAILURE, Return code: 0012

    Hi,
    I'm implementing support packages on a production system.
    By running SAP_APPL (SAPKH60408), the spam goes brocken.
    It returns the following error message :
    The import was stopped, since an error occurred during the phase      
    XPRA_EXECUTION, which the Support Package Manager is unable to resolve
    without your input.                                                                               
    After you have corrected the cause of the error, continue with the    
    import by choosing Support Package -> Import queue from the initial   
    screen of the Support Package Manager.                                                                               
    The following details help you to analyze the problem:                                                                               
    -   Error in phase: XPRA_EXECUTION                                                                               
    -   Reason for error: TP_STEP_FAILURE                                                                               
    -   Return code: 0012                                                                               
    -   Error message: OCS Package SAPKH60408, tp step "R", return code
             0012                                                          
    Could you please help to resolve this issue.
    Regards
    Latif

    Hi
    I had tried as per your suggestion but we are unable to rectify the issue can u please suggest what else we can do
    The error while applying support package
    SP   SAPKH60501
    Phase :XPRA_EXECUTION
    The Background Job is failing
    Job Name: RDDEXECL
    Job started
    Step 001 started (program RDDEXECL, variant , user ID DDIC)
    All DB buffers of application server ..... were synchronize
    Internal session terminated with a runtime error (see ST22)
    Job cancelled
    Dump Details
    In ST22 Dump error
    SYNTAX_ERROR
    CL_GLE_ECS_BRF_ADAPTER========CP
    AC-INT
    Line 17:
    Formal parameter "IV_ALL_REQUESTS" does not exist."
    Regards
    Harsha Teja

  • How to generate the return code automatically through EP

    Hello all,
               I have created a transaction Iview and i am calling transaction SE16 to which i am passing application parameter as the table name which i want to see.Now i am getting the SE16 screen with the table name successfully passed on to the input field. But i want the Iview to process this screen also so that i dont have to press enter to see the next screen. i want this iview to process the SE16 screen directly and show me the next screen. I dont know how can i pass the return code parameter which will directly execute the table name entered in SE16 screen.suppose my table name is "ABC" and i have set the application parameter as DATABROWSE-TABLENAME=ABC&~okcode=ANZE where ANZE is the sy-ucomm value.Plz reply at the earliest.
    Thanks and regards,
    Alpa Desai.

    Madden wrote:
    I do think OOP can only complement procedural programming,Wrong. They don't have to have anything to do with each other.
    but I just wish for my app to exit the same way whether I return or not an exit code.
    I mean we are talking about the implementation, or the system, here.
    Simply let it end and the "return code" will be 0.
    But ... is there a way for a Java application to execute another Java application ? The analog for CreateProcess, but in the Java world ?Start a thread and call the main method of the class that kicks it off with the necessary arguements is one way.
    When an Java app executes another Java app will a new VM be created ?Runtime.getRuntime().exec() and call java ...... Which will, obviously, start a new VM.
    Is ther an internal way, for this that will work inside the same VM ?See the thread situation above.
    How will the parent get the exit code from the child ?If called with Runtime simply call System.exit and then (from the original program) evaluate the return code (see the Runtime and Process classes).
    If called in a thread, without using Runtime.exec any where, then you use a return at the end of the main method, but, if you are looking for a "return code" from an entire application, you're probably looking at Runtime.exec anyway. Otherwise, you are better of writing it so that it can be used in a real OOP manner (i.e. you don't have to call the main method of another application at all, you simply start instantiating and using the classes involved), in which case, a "return code" from the "application" is meaningless.
    >
    Timothy Madden,
    RomaniaEdited by: masijade. on Nov 19, 2007 10:18 AM

Maybe you are looking for

  • PO report with PO confirmations

    Is there a report that will inlcude the confirmed date/qty for a PO line? I tried ME2L, ME2N and the delivery date is the statistical one only... Thank you!

  • FCP X freezes

    Everytime I write a text in the inspector FCp X freezes. I have to force quit and start again. But I could never edit the text once it opens again. I just bought FCP X  and I am really liking it except it slows down my computor alot and fcp freezes r

  • Adobe 9 installation error

    I am running windows 7 and having installation problems with Adobe 9..It comes up with and error box and at the top of the box it says "get+(r) ;error

  • How does the extractor in FXCollections.observableList work?

    How is the "extractor" supposed to work for ObservableLists? According to the JavaDoc it should trigger a update: > This list also reports mutations of the elements in it by using extractor. Observable objects returned by extractor (applied to each l

  • 5800 FOTA Server Profile for North America

    Anyone in the US able to perform firmware updates over the air on the 5800? If so, what is your server profile? When I bought my phone directly from Nokia, it did not have a server profile.