Search help - Need to read dynpro of the calling program

Hello all,
We have a requirement where we need to read the dynpro of the calling program of a search help.
Say I have a screen (selection screen, module pool or ALV grid etc) where I have a field PARTNER with whom a custom search help is attached. But on this same screen there is another field RLTYP. What we want is that when an F4 is taken on PARTNER, the value of RLTYP should also be passed as value to the Search help exit.
In short, we need to read the screen fields of the calling screen of a search help.
Any ideas are appreciated.
Regards
Priyanka

Check the sample code:
FUNCTION F4IF_SHLP_EXIT_OFFRCONT.
""Local interface:
*"  TABLES
*"      SHLP_TAB TYPE  SHLP_DESCT
*"      RECORD_TAB STRUCTURE  SEAHLPRES
*"  CHANGING
*"     VALUE(SHLP) TYPE  SHLP_DESCR
*"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
  DATA : ws_flag(1) TYPE c,
         ws_rec(1)  TYPE c.
  DATA : i_dynpfields TYPE dynpread OCCURS 0 WITH HEADER LINE.
  DATA : ws_data TYPE ddshiface,
         i_data TYPE ddshifaces.
  ws_flag = 'X'.
  ws_rec = 'X'.
  IF ws_flag = 'X'.
    i_dynpfields-fieldname = 'P_CUST'.
    APPEND i_dynpfields.
    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        dyname               = sy-cprog
        dynumb               = '1000'
      TABLES
        dynpfields           = i_dynpfields
      EXCEPTIONS
        invalid_abapworkarea = 1
        invalid_dynprofield  = 2
        invalid_dynproname   = 3
        invalid_dynpronummer = 4
        invalid_request      = 5
        no_fielddescription  = 6
        invalid_parameter    = 7
        undefind_error       = 8
        double_conversion    = 9
        stepl_not_found      = 10
        OTHERS               = 11.
    READ TABLE i_dynpfields WITH KEY fieldname = 'P_CUST'.
    ws_data-shlpfield = 'ZCUSTOMER'.
    ws_data-valfield = 'G_SIMFIELDS-FIELDNAME'.
    ws_data-value = i_dynpfields-fieldvalue.
    APPEND ws_data TO i_data.
    ws_data-shlpfield = 'ZOFFRCONT'.
    ws_data-valfield = 'P_CONT'.
    ws_data-f4field =     'X'.
    APPEND ws_data TO i_data.
    LOOP AT shlp_tab.
      IF ws_rec = 'X'.
        shlp_tab-interface[] = i_data[].
        APPEND shlp_tab.
        ws_rec = ' '.
      ENDIF.
    ENDLOOP.
    DELETE shlp_tab INDEX 1.
    ws_flag = ' '.
  ENDIF.
ENDFUNCTION.
Regards,
Prakash.

Similar Messages

  • Search help unavailable in Read-only input field since EHP4

    Dear Experts!
    I have a problem with a Portal page since the deploy of the EHP4. The page has standard input fields with Search Helps. I needed to have the input field non-modifiable so the user would have to use the search help to get the proper information.
    Prior to the EHP4 installation, I set the input field to Read Only in the WebDynpro explorer, this disabled the editing while permitting the user to use the Search Help.
    Since the installation, the search help is no longer visible or accessible on a Read Only standard inputfield.
    Do you know if there is a way to allow the search help on a read only field?
    Thanks so much for your answer,
    Brian Foster.

    >Since the installation, the search help is no longer visible or accessible on a Read Only standard inputfield.
    This was a conscious design decision on SAP's part that disabled or read-only fields should no longer fire value help.  I am aware that this situation was used in the past as you describe.  It is even still used in SE80 for the Web Dynpro ABAP wizards. However usability studies showed that this often confused end users and therefore it is no longer allowed.  The field must be input enabled to fire the attached serach help.

  • R/3 search helps in java web dynpro

    Hello,
    A customer of ours has some Z transactions in its R/3 system, which basically present a very simplyfied version of MIGO. This Z transaction makes extencive use of Search Helps, which in some cases have been extended.
    A ABAP developer with some  Web Dynpro experience showed me that it was easy to integrate these search helps into his web dynpro application.
    I cannot find how to do this in java web dynpro with the developer studio. Is this possible and if yes, how?
    Greetings, Walter.

    Hi Walter,
                  You can use search helps in Web Dynpro for Java also. The feilds with check table in R/3 automatically give search helps. To provide explicit search help you need use EVS or OVS.
    These are the tutorials
    OVS https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/web%20dynpro%20valuehelp%20using%20object%20value%20selector.pdf
    Value help
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/value%20help%20in%20web%20dynpro%20applications.pdf
    EVS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e57440-ec1c-2a10-36b1-fe92341f98c4
    regards,
    Siva

  • Help needed with Reader Integrated Key

    Hi,
    I have develop a plug-in and apply for Reader Integrated Key License. This plug-in have been tested with acrobat and reader professional and it is working.
    I follow the advice from the above website and use RIKLATools.zip to created the pair.
    i have just receive the Reader Integrated Key from Adobe,I tried all method but the key  does not work with the plug-in. What is the fool proof way to integrate my Reader Integrated Key with the plug-in to get a digtally signed plug-in?
    Urgent help needed as we are submitting the plug-in to client.
    many Thanks in advance
    Regards
    Jia hao

    Thank you lrosenth, i will email them

  • I have a MACBook and need to read documents from the govenment. Where do i get Pure edge viewer or something that will work?v

    I have a MACBook and need to read documents from the government. Where do I get Pure edge viewer or something that will work?  I have Adobe already.

    Try this page http://net4geeks.com/index.php?option=com_content&task=view&id=69&Itemid=13

  • I need to get the info Message generated by the Called Program

    Hi All,
    I am calling an standard SAP program from my own program as follows:
        SUBMIT RFBIBL00 WITH DS_NAME = V_FILE
                        WITH CALLMODE = 'C'
                        with max_comm = '1000'
                        with xinf = 'X'
                        AND RETURN.
    As soon as the called program parks invoice and finish execution, it generates an info message at the status bar but I can't capture this message which contains the newly created invoice No.
    I have tried to call the above program with xlog = 'X' option which prints the info messages as a log report after the programs finishes, but I am still not able to capture that log as well, although I have tried with the EXPORTING LIST TO MEMORY option while submitting the program but it just prints the log as report without sending it to memory.
    Please let me know if there is some way to do it.
    Regards,

    Hi Athar,
    1. MESSAGES cannot be CAPTURED
       using submit
    2. For that CALL Transaction
                MESSAGES Into Itab
       is required.
    3. For your requirement,
       make a new TCODE for this program
       eg. ZR0   (ZR zero)
    4. Fill the bdc table
    5. use this code (just copy paste)
       make modifiction as per ur requirement.
    6.
    REPORT abc.
    DATA
    DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA: l_mstring(480).
    TABLES : t100.
    FILL DATA
    PERFORM bdcfill USING :
    'X' 'RFBIBL00' '1000'
    , '' 'CALLMODE' 'C'
    , '' 'XLOG' 'X'
    , '' 'BDC_OKCODE' '=ONLI'
    TRANSACTION
    CALL TRANSACTION 'ZR0'
    USING bdcdata
    MODE 'N'
    MESSAGES INTO messtab.
    PERFORM showmsg.
    BDC FORM
    FORM showmsg.
    MESSAGES
      LOOP AT messtab.
        SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
                                  AND   arbgb = messtab-msgid
                                  AND   msgnr = messtab-msgnr.
        IF sy-subrc = 0.
          l_mstring = t100-text.
          IF l_mstring CS '&1'.
            REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
            REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
            REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
            REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
          ELSE.
            REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
            REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
          ENDIF.
          CONDENSE l_mstring.
          WRITE: / messtab-msgtyp, l_mstring.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "SHOWMSG
    BDC FORM
    FORM bdcfill USING a b c.
      CLEAR bdcdata.
      IF a = 'X'.
        bdcdata-program = b.
        bdcdata-dynpro = c.
        bdcdata-dynbegin  = 'X'.
      ELSE.
        bdcdata-fnam = b.
        bdcdata-fval = c.
      ENDIF.
      APPEND bdcdata.
    ENDFORM.                    "bdcfill
    I hope it helps.
    regards,
    amit m.

  • How to implement search help instead of match code objects table in program

    Hi,
    We are now in upgrade process of code remediation ( From 4.6c to EC6.0).
    We have created search helps instead of matchcode object table. This match code object table M_VMVLC has been deleted
    in EC6.0.  And search help VMVLC is available.
    In the program, they have used <M_VMVLC > -<fieldname> i.e. <tablename> - <fieldname> in declaring parameters,
    in the 'into' clause of select statement, in the 'from' clause of select statement, in the 'write' statement.
    I want to know how to replace this matchcode object table with the search help in the program.
    Thanks,
    Abirami.

    Hi,
    Check the link
    http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
    Regards,
    Amit

  • Just purchased 1 year prepaid Creative Cloud Photography Plan and Lightroom saying "  Develop Module is Disabled "  What do I need to do to activate the full program?

    Hello,  I just purchased 1 year prepaid Creative Cloud Photography Plan and Lightroom saying "  Develop Module is Disabled "  What do I need to do to activate the full program?

    Are you signed into the creative cloud application manager?
    Did you install Lightroom from the creative cloud application manager?

  • How to get data from the called program using SUBMIT in a background job?

    Hi Experts,
    I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
    Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
    My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
    I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
    Kindly let me know your inputs and valuable suggestions.

    Kumar,
    When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
    Check these threads to get some idea
    submit report to spool & import spool id
    Re: Generate Spool for a report
    K.Kiran.

  • To find the Calling Program of an sap script

    Hi All,
    Can any body please let me know how to find the calling program ( main program ) of an SAP Script Form.
    Thanks and Regards,
    Rupesh

    Hi,
    if it's possible to create the form online (no background job), this works:
    From SE71 (Form painter), use menu Utilities-->activate debugger.
    Then start the program creating the SAPscript form.
    As soon as form processing starts, you are inside the SAPscript debugger. At this point, enter /h in command line to activate ABAP debugger. Continue to get into abap debugging. In ABAP debugger, use button 'calls' to see the call stack. The program at the bottom is the starting point, this or one of the more upwards program triggers the form.
    Hope this helps.
    regards,
    C.

  • Passing the dynamic internal tables to the calling program

    Hello,
    From my user exit USEREXIT_MOVE_FIELD_TO_VBAP in program MV45AFZZ I am calling a routine to build dynamically an internal table. I get A DUMP in the perform statement. Please see below.
    *FORM USEREXIT_MOVE_FIELD_TO_VBAP.*
    *Global declarations
    RANGES: KSCHL      FOR A605-KSCHL,
                   KUNNR     FOR A605-KUNNR,
                   MATNR     FOR A605-MATNR.
    field-symbols: <dyn_table> type standard table,
                         <dyn_wa>,
                         <dyn_field>.
    *Internal tables and work areas
    data: dy_table type ref to data,
            dy_line  type ref to data,
            xfc type lvc_s_fcat,
            ifc type lvc_t_fcat.
      KSCHL-sign   = 'I'.
      KSCHL-option = 'EQ'.
      KSCHL-low    = 'ZB00'.
      APPEND KSCHL.
      if not vbap-matnr is initial.
        MATNR-sign   = 'I'.
        MATNR-option = 'EQ'.
        MATNR-low    = vbap-matnr.
        APPEND MATNR.
      endif.
      if not vbak-kunnr is initial.
        KUNNR-sign   = 'I'.
        KUNNR-option = 'EQ'.
        KUNNR-low    = vbak-kunnr.
        APPEND KUNNR.
      endif.
    perform get_data(ZSD_CARRIER_SELECTION)
                               TABLES KAPPL
                                             KSCHL
                                             KUNNR
                                             MATNR
                              CHANGING <dyn_table>.
    *ENDFORM.*
    *Then in program ZSD_CARRIER_SELECTION*
    *Global declarations
    RANGES: KSCHL      FOR A605-KSCHL,
                   KUNNR     FOR A605-KUNNR,
                   MATNR     FOR A605-MATNR.
    field-symbols: <dyn_table> type standard table,
                         <dyn_wa>,
                         <dyn_field>.
    *Internal tables and work areas
    data: dy_table type ref to data,
            dy_line  type ref to data,
            xfc type lvc_s_fcat,
            ifc type lvc_t_fcat.
    *FORM get_data  CHANGING dyn_table.*
      select single * into w_t685
      from t685 where KSCHL eq P_KSCHL
                  and KOZGF ne space.
      select * into table i_T682I
      from T682I where KVEWE = w_t685-KVEWE
                   and KAPPL = w_t685-KAPPL
                   and KOZGF = w_t685-KOZGF.
      loop at  i_T682I into W_T682I.
        CONCATENATE 'A' W_T682I-KOTABNR INTO w_dd02l-TABNAME.
        itables-TABNAME = w_dd02l-TABNAME.
        collect itables.
      endloop.
      loop at itables.
        perform get_structure tables ifc
                              using  itables-TABNAME.
      endloop.
      loop at ifc into xfc where key = 'X'.
        clear i_fields.
        i_fields-FIELDNAME = xfc-fieldname.
        i_fields-sign      = 'I'.
        i_fields-option    = 'EQ'.
        if xfc-fieldname = 'KSCHL'.
          i_fields-low = 'ZB00'.
        endif.
        append i_fields.
      endloop.
      call method cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
      assign dy_table->* to <dyn_table>.
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    *ENDFORM.*
    *FORM get_structure tables ifc type LVC_T_FCAT*
                       *using TABNAME.*
      data : idetails type abap_compdescr_tab,
             xdetails type abap_compdescr.
      data : ref_table_des type ref to cl_abap_structdescr.
    * Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( TABNAME ).
      idetails[] = ref_table_des->components[].
      select * into table i_dd03l
      from dd03l where tabname = tabname.
      sort i_dd03l by fieldname.
      loop at idetails into xdetails.
        clear xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype  = xdetails-type_kind.
        xfc-inttype   = xdetails-type_kind.
        xfc-intlen    = xdetails-length.
        xfc-decimals  = xdetails-decimals.
        read table i_dd03l with key fieldname = xfc-fieldname
                                    KEYFLAG   = 'X'.
        if sy-subrc = 0.
          xfc-key   = 'X'.
        endif.
        collect xfc into ifc.
      endloop.
    *ENFORM.                    "get_structure*
    Thanks in advance.
    Please use code tags in the future when pasting code.
    Edited by: Rob Burbank on Mar 2, 2009 4:29 PM

    Hi,
    In the calling program whereyou are calling the subroutine...
    perform get_data(ZSD_CARRIER_SELECTION)
                               TABLES KAPPL
                                             KSCHL
                                             KUNNR
                                             MATNR
                              CHANGING <dyn_table>.
    you have made use of field symbol <dyn_table> which you have not assigned.... due to which you are getting a dump....
    so before the call you have to assign this field symbol and then use it in the call...
    just assing to some dummy type and then you pass it using changing...
    later on in the called program you can unassign the field-symbol as soon as you enter in the subroutine.
    data itab type standard table of scarr.
    assign itab to <dyn_table>.
    perform get_data(ZSD_CARRIER_SELECTION)
                               TABLES KAPPL
                                             KSCHL
                                             KUNNR
                                             MATNR
                              CHANGING <dyn_table>.
    even if this does not solve your problem try debugging and check at which line it is going for a dump... so that it gives a clear idea where exactly is the fault
    Regards,
    Siddarth

  • Calling the selection screen of the calling program after the execution of

    Hi all,
    I had created a program for a purchase order display.
    It has three radio-buttons from where i am calling different programs.
    I am using submit in the calling program and get parameter in at selection-screen output of the called program.
    I am getting the end report without the display of the selection screen of called program. But when i am clicking back on the end-report then i want to come back on the selection screen of the calling program. But i am coming out of the execution.
    Can anyone please tell me how to call the selection screen.
    Thanks in advance,
    Regards
    vamsi

    Hi, when you do the SUMBIT statement, make sure that you are using the extension........  AND RETURN.
    Submit <report> <b>AND RETURN</b>.
    This should return control to the caller.
    Regards,
    Rich Heilman

  • How do I get the calling program?

    Hi,
    I have been using a function module for a long time which is called by quite a number of programs. Now I want it to react differently dependent on the calling program.
    I could use a new optional parameter of course transferring the program id. In that case I have to change quite a number of programs.
    I was just wondering if there is a possibility to get the information of the calling program on the fly. (In the debugger you can find your calling program easily in the 'call stacks'). Does anyone know how to retrieve this information?
    Thanks in advance.
    Regards Johannes

    Hi,
    I am quite overwhelmed by the amount of answers.
    Actually ufortunately neither of the solutions offered solve my problem.
    1.) sy-cprog gives the name of the main program and not the name of the module/include/method that has called my function.
    2.) The function 'RS_EU_CROSSREF' was unknown to me. It is very interesting but it is a cross reference und shows all calling programs and not the one that was actually calling the function.
    Does anyone has got any other ideas?
    Regard Johannes

  • Need help- need to read a customer table from the payroll schema

    Hi gurus,
    I need to read an amonunt from a customer table in the payroll schema. Is it possible to input TABLE XXXX in the schema, or is impossible to read from a customer table?Do I need to create a report to upload the amount in an infotype?
    Thanks in advanced for for support!

    You should create your own custom operation (based on operation TABLE) to read your custom table from a Payroll PCR.
    If your custom table's name is longer than 5 characters, you may be required to use operations VAOFF and/or VALEN prior to your custom operation in the PCR.

  • Search help needs more records than 500 or 5000

    I have a requirement to create search help on a non primary key field . So I need to work on search help exit to remove all the repeating and blank values . The problem I am facing rite now is that search help gets only 500 records by default and 5000 if we leave the restriction field blank . I need to get all the records which is approx more than 100000 and get only the unique values .
    Please let me know how I can increase the number of record more than 5000
    Regards,
    Tashi

    Hi Tashi,
    The following approach might work out in y our case by overwriting the data fetch functionality of the standard Search help
    1. Define internal table of desired structure, in the way you get the data from DB table
    2. use your custom function module / class method or select statement to get the desired data into the newly
        defined   internal table
    3. apply required sorting / filtering / formatting as per the requirements
    3. loop through the resultant data in the internal table and append the records to standard internal
        table / parameter  RECORD_TAB of the Search help exit. Please make a note that RECORD_TAB has the
        structure field STRING which needs to be populated with the correct offsetting..for example, if the first field
         is of 10 characters and second field of 5 characters, it should be populated in the following way
    loop at itab into ls_itab.
    wa_record-string+0 = ls_itab-field1.
    wa_record-string+10 = ls_itab-field2.
    wa_record-string+15 = ls_itab-field3.
    append wa_record to record_tab.
    clear wa_record.
    endloop.
    EXIT.
    Please try this approach and let us know.
    hope this helps.
    -Sajan Joseph.

Maybe you are looking for

  • How do I change the width of a lead column in an enhanced layout ?

    I have an enhanced layout in BPS that gets rendered in TPM (CRM2007) application. I need to increase the width of a lead column in this layout. I saw a bunch of methods in a BADI UPX_LAYOUT_RENDER. There is one to manipulate XML and another to manipu

  • Is there a way to transfer Apple video to Windows format?

    I have some video made on Apple format that I need to transfer to Windows format.

  • Syncing photos Question

    Trying to clean up my photos. I created a folder and put only the photos I want on my iPhone into it. I then connect my 4s to iTunes and go to the photos tab and choose sync selected folder and choose the folder. The problem is all of the photos were

  • Use BAPI_COSTACTPLN_POSTPRIMCOST

    How to use BAPI_COSTACTPLN_POSTPRIMCOST Function? In test program function works correctly and update cost planning values. But if i try to test function in SE37 transaction - does not. Why???

  • OPMN start failed - but I can see opmn -d running via ps -ef

    I am trying to figure out why I keep getting the message OPMN start failed when trying to start OPMN. The thing I don't understand is why I can see the processes opmn -d running when I look via ps -ef. If I run the opmnctl startall command once more