Calling program

Dear Experts,
     I have a requirements explained below.
    I have writen a Z program with the selection screen,  i need to execute the standard program RIMHIO00 (grid report)from Z Program by passing values to the selection screen of standard program after execution is completed i need the final internal table(object_tab) values back in my Z program for further process..
   i tried with the submit export to memory statement but it is not working for grid report, Is there any other way to do the above requirements
pls help me in this,
thanks in advance
karthik

Hi,
In the copy of the standard program,you will be getting final internal table values before displaying alv grid.Once the final internal table is arrived,just export the internal table.Just remove the coding related the grid display.Then from your original program,import the internal table.
Check here for export and import command.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/export01.htm
Kindly reward points by clicking the star on the left of reply,if it helps.
Message was edited by:
        Jayanthi Jayaraman

Similar Messages

  • 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.

  • Submit report in background and get result into calling program

    Hi,
    I want to call the standard SAP program from Zprogram to create invoice using Submit. here the code
    SUBMIT RV60SBT1  TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        WITH VKOR1 eq TVKO-VKORG
                        with X_VBELN eq gv_vbeln_so
                        with ALLEA eq 'X'
                        with ALLEL eq ''
                        AND RETURN.
    the standard SAP program creates invoice (billing document number). I want to get the billing document number which created using the above statement into the calling program.  ......could anyone pls tell me how to do this? ie how to read the billing document number in the calling program.
    Regrds
    shan
    Edited by: Shankar Raju Devadoss on Mar 21, 2011 9:00 AM

    Hi Shankar,
    You can try it in both ways.
    1.   By using the parameter ID VF. (GET PARAMETE ID)
    2.   Select the invoice numbers from the table VBRK for the current date (SY-DATUM) and
           sort it by time and get the latest invoice.
    Regards
    Hareesh Menon

  • Call program screen in ABAP Report

    I have a execute program which match to a transaction, in the program, which will generate a selection screen and do selection. After that, the program will call another program screen to do somethings, i want to know can i call program's screen in my execute report, thanks

    Hi
    To Call the Transaction :
      CALL TRANSACTION '<TCODE>' AND SKIP FIRST SCREEN.
    To call a Report :
      SUBMIT <REPORT> USING SELECTION-SCREEN <NO>.
    <b>Reward if Helpful</b>

  • Changing data in called program

    Hi Gurus,
    I have an exit where I want to change the main program's internal table data dynamically in this exit FM.
    In short, I want to change the internal table data in calling program being in called FM.
    Can this be done? If so how?
    Regds

    You can change the data in a field in a program using field-symbols. The field-symbols acts as a pointer to a defined field. Change the field-symbol value will in turn change the value of the field. You can also assign the value of a field from a different program ( at runtime ) to a field symbol. But I beleive that in this circumstance changing the field-symbol will not change the actual field value.
    I had this same problem myself.

  • 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.

  • 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.

  • 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

  • Updating a table used in a calling program

    I am creating an internal version of the notification report program and would like to use a table created in the called program in the main program.
    I generate the data in the called program and would like to "pass" the data into a holding table in the calling program.
    For instance called program loads table i_hold_text, I would like to pass this to calling program ZRIPRSN00 table GT_HOLD_TEXT to use in the SAPScript. Ideas?

    You could use field-symbols.
    like
    DATA: l_text(18) VALUE '(SOURCE_PROGRAM_NAME)table_name[]'.
    field-symbols <fs> type table.
    Assign (ltext) to <fs>.
    if sy-subrc eq 0.
    "Do what you want with <fs>
    endif.

  • 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

  • Syntax errors in WLST are not reported to calling program

    Hi,
    When there are syntax errors in WLST-script, the calling program will get no information about this.
    In our case the calling program is ANT. If the user enters invalid properties it could cause syntax errors in the WLST script. But the ANT task always receive a successfull code back and doesn't know that it went wrong.
    What is the workaround for this? How can I from WLST return a fail code so that ANT does not continue?
    Regards,
    Martin

    Hello Martin,
    This is a known problem with wlst-jython. One cannot catch syntax errors
    programmatically. The only way is to avoid loading properties file
    that may cause syntax errors.
    I am curious though how can a user enter invalid properties via a script?
    thanks,
    -satya
    Martin Gustavsson wrote:
    Hi,
    When there are syntax errors in WLST-script, the calling program will get no information about this.
    In our case the calling program is ANT. If the user enters invalid properties it could cause syntax errors in the WLST script. But the ANT task always receive a successfull code back and doesn't know that it went wrong.
    What is the workaround for this? How can I from WLST return a fail code so that ANT does not continue?
    Regards,
    Martin

  • Send XML to Client: call-program cannot pass ampersand in parameter

    In WLI Studio, I have tried to use the action "Send XML to Client" with
    following information:
    <call-program mode="async" name="IEXPLORE.EXE">
    <actionid>1027425345078</actionid>
    <parm>http://pttserver:7001/pttWebApp/Test.jsp?First=a&Second=b&Third=c</par
    m>
    </call-program>
    The problem is that the ampersand (&) of call-program parameter will always
    shift three character right on any program (e.g., IE, Notepad, etc.).
    From the above example, IE can be called correctly, but its parameter -- a
    string
    "http://pttserver:7001/pttWebApp/Test.jsp?First=a&Second=b&Third=c", will be
    passed as
    "http://pttserver:7001/pttWebApp/Test.jsp?First=aSec&ond=bThi&rd=c".
    I have also tried to use the string "&" instead of an ampersand, and the
    parameter was passed as
    "http://pttserver:7001/pttWebApp/Test.jsp?First=aamp&;Second=bamp&;Third=c".
    What should be used in order to pass the ampersand character correctly?
    If it is a bug, can any one suggest the workaround?
    Thankyou in advance,
    Suwanee Suwanapong

    If you think you're encountering URL length issues make sure you are using POST and not GET, although it looks like there may be additional issues:  http://www.javaworld.com/community/node/2307

  • Reset or Clear SAP user context by external RFC caller program

    Hello,
    I have a SAP system with performance problems due to a SAP user context starts using a lot of memory.
    This user context comes from an External RFC caller program written in Delphi and which uses the SAP RFC SDK provided by SAPGUI 6.40: SAP Automation library, SAPFuntionsOCX, I mean, using methods in the object "SAPFunctions" in SAPFunctionsOCX in file "wdtfuncU.ocx", in SAPGUI directory.
    Everytime we have performance problems, this RFC SAP user context is using near 1400 Mb of extended memory, although there is a lot of free physical RAM memory available, there are free dialog processes and CPU load is low (no more than 30%).
    This performance problem is solved by closing the external program (written in Delphi) which connects to SAP via RFC.
    This external program works for the warehouse management and connects to SAP several times per minute. Due to connection performance and the high frequency with which this external program must connect to SAP, the connection to SAP is not closed after each call to RFC SAP function modules.
    The extended memory used by this SAP RFC user is growing along time. I detected, using ST03 transaction, that these user sessions have always the same transaction code hash, I mean, although the external programs call the same SAP RFC funcion modules several times (¡¡¡ always clearing the variables at the beginning and at the end of de ABAP code, with ABAP commands like REFRESH and FREE ¡¡¡¡) the technical transaction code is the same and I suppose the user context (in extended memory) is not deleted.
    I think it is better than the external program close the context memory (similar to "/n" okcode in SAPGUI).
    But we don't want to close the connection, because the external program connects to SAP with a high frequency, and the logon process is expensive.
    Is there any way to send something similar to "/n" (end of transaction) from the external program? Is there any command in the SAP RFC SDK library (SAPFuntionsOCX or something similar?
    I cannot find any method to do that in the object "SAPFunctions" in SAPFunctionsOCX in file "wdtfuncU.ocx", in SAPGUI directory.
    Old information for Object Classes "SAPFunctions" in SAPFunctionsOCX in file "wdtfuncU.ocx", in SAPGUI directory, is described in the following URL:
    http://help.sap.com/saphelp_45b/helpdata/en/39/7e00d1ac6011d189c60000e829fbbd/frameset.htm
    But I cannot find anything related to something similar to a "/n" in SAPGUI.
    As I have the SAPGUI installed on my desktop, I can see all SAP RFC classes and methods from Excel, by opening the Visual Basic editor.
    I am only asking a way to send to SAP a command to free the user context used for an open RFC session in order to avoid the memory used to be continuously growing, without having to close the RFC session.
    The external program only calls a certain SAP function module periodically and we want to free the user context between calls without logging off. This is the same, very similar, as if we called that function from SAPGUI and we used "/n" in SAPGUI between calls.
    Anyone can help me?
    Thanks and best regards.

    Hello,
    I don't know if this will solve your problem, but you may be using MF 'RFC_CONNECTION_CLOSE' between each call of you RFC function.
    Regards
    Brice
    Edited by: blsapsdn on Apr 15, 2011 5:27 PM

  • Find original calling program or transaction...

    Hello,
    I want to keep a User-exit from running when it is ran from LT23, but I want it to work from LT11. The problem is when the function to confirm the TO is executed in LT23, it does a call transaction to LT11.
    So, in the user-exit SY-TCODE has LT11 in it.
    I have tried using SYSTEM_CALLSTACK and the first program in there is the initiating program for LT11, SAPML03T.
    So, does anyone know a way to be able to find that either LT23 or the program RLLT2300, was the calling program for the CALL Transaction to LT11?
    Any help would be greatly appreciated.
    Thanks,
    Rocky

    Interesting.  The only way that I can think of off the top of my head is to have a "Z" version of LT23 and hence a "Z" version of the program behind it.  Just before calling the transaction LT11, set some flag in a memeory id using the EXPORT statement.  Then in the user exit, IMPORT that flag,  if the value is set, then exit out of the user exit.
    In the "Z" version of LT23.
    data: flag(1) type c.
    flag = 'X'.
    EXPORT flag to MEMORY ID 'WHATEVER'.
    In the user exit function module.
    IMPORT flag FROM MEMORY ID 'WHATEVER'.
    if flag = 'X'.
    exit.
    endif.
    Probably not the best way, but can't think of anything else right now.
    Welcome to SDN.  Please remember to award points for any helpful answers that you might receive.  Thanks.
    Regards,
    Rich Heilman

  • Call Program from another Program using varient via Selection Screen

    I am calling a standard report from my Z Program via Selection screen.
    Is there any way to hide the Execute button that is seen when we see the called program selection screen?

    Hi Shyam,
                      Thanks for the quick reply.
    But my requirement is to show the selection screen of called program as i need to make some values changes in the selection Screen.
    However, the user can accidently click the execute button which i dont want thats why i need to hide the execute button.
    My aim is to change values of selection screen but nto execute it.
    Is it possible?

  • Call Program from another Program using varient

    Hi...
    How to call program from program with varient....?
    i have used submit but how to pass varient dynamically.
    Regards,
    Chintan

    Hi,
    Use the FM SUBMIT_REPORT
    OR
    SUBMIT <Program Name> VIA SELECTION-SCREEN
                                      USING SELECTION-SET <VARIANT>
                                      AND RETURN.

Maybe you are looking for

  • Advanced webservices

    Hi, I'm trying to consume a SOAP web service that requires complex datatypes. The relevant portions of the WSDL: <s:element name="SearchHotels"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="sDestination" type="s:string"/>

  • Oracle services for MTS (Oracle 9i2)

    I follow up all steps to make service to work. But it seems to be not working properly. How can i configure this service? How can i make sure that the service are correctly installed? Is necesary the old snap-in configuration in 9i version?

  • HT201272 My previous app purchases are not listed in itunes

    I purchased apps in iTunes.  I had an accident and my iPhone broke. I got a replacement and was able to restore my fotos and contacts, but I can not find my old apps that I purchased thru iTunes. please advise how to find them to sync to my new iPhon

  • Modifying custom end user menu - tabs

    Hi I have created a custom form within IdM 8.0. which I want to display instead of default end usermenu form. I have made necessary mapping for form type - "endUserMenu" under form and process mapping. I see my changes under HOME tab of default end u

  • Flash Code Hinting not working

    I cannot seem to get code hinting working for flash (not flex) packages in Flash Builder Professional. Code hinting is working for some some packages, but it doesn't include the the Flash specific packages (flash.*). My Referenced Libraries includes