CAlling a program through submit statement

Hi,
how to fill selection screen of called program from values of calling program through submit.

Hi,
check this
given clearly in SAP keyword help
submit <report name> WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.

Similar Messages

  • How to pass a value and call SE38 program using SUBMIT statement

    Hello Friends
    I am trying to write a batch program in SE38, that calls other SE38 Programs.
    I don't want to use Parameter command to see the value on screen.
    All I want is to send a range of date (ToDate & FromDate) and generate different reports satisfying this date range condition.
    Can some one please help me with this. I would really appreciate it.
    I have tried the command SUBMIT with options of filling the input fields of the subsequent programs but I don't want to do this.
    I want all the sub programs to be called one after another and the reports generated using the date varialbles I send from the main program.
    I don't want to use se37 functions because of the client's request.
    Any help will be highly appreciated.
    Tks
    Ram

    Yes I am using SUBMIT command but I was not using the right options with the SUBMIT command and once I used the right options, it worked.
    Tks
    Ram

  • Regading getting data to and forth between 2 programs through SUBMIT

    Hi All,
    I have a issue regarding fetching internal table data from one program to another.
    Actually I have <b>Main Program</b> from that through SUBMIT statement i am calling another program and executing it for every 100 records - Actually this program is having BAPI running in it, By result i will get an internal table data. Now i want to get that internal table data back into my MAIN Program so that i can use it for next process.
    <b>EXPORT & IMPORT statements are working from MAIN Program to Other Program.</b>
    <b>EXPORT & IMPORT statements are not working from Other Program[SUBMIT'ed Program] to MAIN Program.</b>
    So can anybody tell me how can i get that data in other program into MAIN Program[Back].
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    When you submit the program is then running in parallel with the program which submitted it.  There is no mechism that you are using to stop the calling program and wait for the submitted program to finish and bring back some data.   Most likly program 1 ends before program 2 is finished updating the material master. You can do this kind of thing with Function modules.   You would put your call to the submitted program inside of a function module,  then call that function module saying STARTING IN NEW TASK,  then you can wait for it to be done and get the results using the RECIEVING statement.
    Here is the F1 Help.
    +
    CALL FUNCTION
    Variant 2
    CALL FUNCTION func ...STARTING NEW TASK task name.
    Additions:
    1. ... DESTINATION dest
    2. ... DESTINATION IN GROUP group name
    3. ... DESTINATION IN GROUP DEFAULT
    4. ... PERFORMING form ON END OF TASK
    5. ... EXPORTING  p1 = f1    ... pn = fn
    6. ... TABLES     p1 = itab1 ... pn = itabn
    7. ... EXCEPTIONS syst_except = rc MESSAGE mess
    Effect
    Starts the function module func asynchronously ina new session. In contrast to normal function module calls, the callingprogram resumes processing as soon as the function module is started inthe target system. It does not wait until the function module hasfinished. Through CALL SCREEN,the called function module can, for example, display a screen and thusinteract with the user.
    Notes
    This variant applies only from R/3 Release 3.0, so boththe client system and the server system must have Release 3.0 orhigher.
    With this variant, the called function module must also be flagged inthe Function Builder as externally callable, even if it is executedlocally (without the addition DESTINATION).
    There can be no function call to the destination 'BACK' in thecalled function module (for more information about the destination 'BACK', see CALLFUNCTION func DESTINATION dest).
    This variant does not support the execution of externalprograms accessible via the destination of the TCP/IP type asasynchronous calls (see the Transaction Tools ¨Administration, Administration ¨ Network ¨ RFC destinations formaintaining destinations).
    You cannot display screens (screens or lists asamodal windows in RFC communication using SAP Router.
    From Release 4.0, you can check the load of each RFC destination moreclosely (in the RFC destination maintenance for an R/3 connection, choose Destination -> ARFC options). This checks whetherthe target host has sufficient resources before the function module isexecuted. If the target host is overloaded, the system delays executingthe function module. The algorithm for calculating the load on thetarget host is the same one used in an asynchronous RFC call using the DESTINATION IN GROUP addition. Note that this option can only beused with target hosts running Release 3.1H or higher. Note also thatit is the default setting.
    In principle, parallelization makes sense whenever applicationservers have the necessary resources. In this case, the applicationservers must be configured with at least 3 dialog work processes.
    A program that is run in the background and uses RFC parallelizationrequires at least 1 dialog work process per application server becausedialog processes use parallel execution.
    If the instance profile parameter 'auth/rfc_authority_check'is set (to 1), the system automatically performs an RFC authorizationcheck. The authorization check refers to the relevant function groupfor the function module to be called. If no authorization is found, aruntime error occurs. You can check the authorization in advance withthe function module AUTHORITY_CHECK_RFC. If the communication takes place in the same system with thesame user context (same client and user ID), there is no authorizationcheck. For further information, refer to the RFCAuthorization Concept.
    When you are using asynchronous RFC to implement parallel windows,all these windows are closed if the caller session is the only sessionand terminates.
    ABAP_ADDITION_1&
    ... DESTINATION dest
    Effect
    Executes the function module externally as a RemoteFunction Call (RFC); dest can be a literal or a variable.The R/3 System where the function module is executed depends on thespecified destination. Externally callable function modules must beflagged as such in the Function Builder (of the target system).
    Note
    If the destination is not explicitly specified, the systemuses the default destination 'NONE'.
    Note
    If, during a RemoteFunction Call, an error occurs in the target system, detailsof the error message are passed bac to the calling system in thefollowing system fields: SY-MSGNO, SY-MSGID, SY-MSGTY, SY-MSGV1,SY-MSGV2, SY-MSGV3, and SY-MSGV4. These fields areinitialized before every RFC. If a short dump or a type X messageoccurs, the short text of the dump is transferred to the caller, andthe contents of SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 assigned by the system.
    In RFC-enabled function modules, no ABAP statements are allowed thatwould end the RFC connection (for example, LEAVE, SUBMIT or the ANDRETURN addition).
    Note
    Note that a database commit occurs at eachRemote Function Call (RFC). Consequently, you may not use RemoteFunction Calls between pairs of statements that open and close adatabase cursor (such as SELECT ... ENDSELECT).
    Addition 2
    ... DESTINATION IN GROUP group name
    Addition 3
    ... DESTINATION IN GROUP DEFAULT
    Effect
    You use this addition to perform parallel execution offunction modules (asynchronous calls) on a predefined group of R/3System application servers.
    You use addition 2 (DESTINATION IN GROUP group name) toperform parallel execution of function modules on a predefined group ofapplication servers. To maintain the RFC groups, choose Tools ¨ Administration ¨ Administration ¨ Network ¨ RFCdestinations ¨ RFC ¨ RFC groups. The application programmer isresponsible for the availability of RFC groups in the productionsystem.
    You use addition 3 (DESTINATION IN GROUP DEFAULT) to performparallel execution of function modules (asynchronous calls) on all currently available R/3 System application servers. However,instead of this variant, you are recommended to use an RFC group withappropriate resources for parallel processing of asynchronous calls (atleast for performance reasons). Please note that the additionDESTINATION IN GROUP ' ' has the same effect as the additionDESTINATION IN GROUP DEFAULT.
    When you first call a function module with these additions, thesystem initializes the specified RFC group (provided no explicitinitialization has already been performed).
    To obtain current information about resources (that is, the number ofresources available to process function modules), you can alsoinitialize the RFC group explicitly in the program via the functionmodule SPBT_INITIALIZE. You must perform this actionbefore the first function module call.
    In both cases, the system first determines the number of currentlyavailable resources (work processes) on the available applicationservers (either a group of servers or all servers). By checking thecurrent system load of each application server, the system determineshow many work processes are available to execute asynchronous calls.
    After determining the available resources, the asynchronous call isexecuted at one of the destinations. If no resources are available atthat particular time, the system executes the exception routine RESOURCE_FAILURE (see the addition EXCEPTIONS). In thecase of an asynchronous function module call, this exception must be handled by the application program (see example).
    Parallel processing cannot take place if any of the resourcethresholds are exceeded.
    Notes
    In order to be taken into consideration for RFC parallelprocessing, an application server must have at least 3 freedialog processes.
    The system triggers the exception RESOURCE_FAILURE only forasynchronous RFCs with the additions DESTINATION IN GROUP groupname and DESTINATION IN GROUP DEFAULT.
    At present, only one RFC group per program environment issupported for parallel execution of asynchronous calls. Using both theadditions DESTINATION IN GROUP group name and DESTINATION INGROUP DEFAULT in a program is thus not allowed.
    To find out which destination was automatically selected, call thefunction module SPBT_GET_PP_DESTINATION immediately after thefunction module call with the two additions. This returns the selectedRFC destination.
    If you want to delete an application server from the list of theconfigured RFC group at runtime (for example, when the applicationserver is not accessible for technical reasons), use the functionmodule SPBT_DO_NOT_USE_SERVER.
    Addition 4
    ... PERFORMING form ON END OF TASK
    While the parameters for receiving results (i.e. IMPORTING andTABLES parameters) are specified directly as additions in thecase of "conventional" function modules (see variant 2), these arelogged in the FORM routine form when making anasynchronous call (see RECEIVE).
    Notes
    If a function module returns no result, and you are notinterested in error messages that arise when executing the functionmodule, this addition (... PERFORMING form ON END OF TASK) canbe omitted.
    If you want to handle the error messages that arise when executingthe asynchronous function module call, you must use thisaddition. Also, when receiving the results in the FORM routine(see RECEIVE), you must reactaccordingly to the system exceptions SYSTEM_FAILURE andCOMMUNICATION_FAILURE.
    With asynchronous RFC, the task name uniquely identifies theasynchronous connection and thus the context called.
    If several asynchronous function modules are executed consecutivelyto the same destination, you must assign a different task name to each.
    A calling program that starts an asynchronous RFC with PERFORMINGform ON END OF TASK cannot switch roll areas or change to aninternal session. This is because the asynchronous function module callreply cannot be passed on to the relevant program. You can perform aroll area switch with SUBMIT or CALL TRANSACTION.
    If a calling program makes asynchronous calls, finishes, and thenexpects responses, these responses cannot be delivered.
    To wait for the reply to a started asynchronous function module, usethe WAIT command with the additionPERFORMING form ON END OF TASK. Here, WAIT must be in thesame program context (session).
    Note that the execution of the asynchronous calls involves a changeof roll area. This means that the FORM routines for receivingthe external calls can be processed while you are making furtherexternal calls. This means that the developer must ensure thatthe FORM routines can be executed at any time. You cannotmake any assumptions about the processing sequence.
    Addition 5
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    EXPORTING passes values of fields and fieldstrings from the calling program to the function module. In thefunction module, the formal parameters are defined as importparameters.
    Addition 6
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes the contents of internal tables.
    Addition 7
    ... EXCEPTIONS syst_except = rc MESSAGE mess
    Effect
    While any exceptions arising in the called functionmodule are handled by the second addition (in the FORM routine),this addition can handle two special system exceptions, as withfunction module calls with the addition DESTINATION:
    SYSTEM_FAILURE
    is triggered, if a system crash occurs on the receiving side.
    COMMUNICATION_FAILURE
    is triggered if there is a connection or communication problem.
    In both cases, you can get a description of the error with theoptional addition
    ... MESSAGE msg
    Note
    In principle, you should always react to these twosystem exceptions, whether you are making an asynchronous functionmodule call or receiving results.
    Examples
    Asynchronous call to a transaction and display in a separate session.
    DATA: MSG_TEXT(80) TYPE C. "Message text
    Asynchronous call to Transaction SM59 -->
    Create a new session
    CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
      DESTINATION 'NONE'
      EXPORTING
          TCODE = 'SM59'
      EXCEPTIONS
        COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
        SYSTEM_FAILURE        = 2 MESSAGE MSG_TEXT.
      IF SY-SUBRC NE 0.
        WRITE: MSG_TEXT.
      ELSE.
        WRITE: 'O.K.'.
      ENDIF.
    Using RFC groups to parallelize function module calls (RFC parallelprocessing)
    TYPES: BEGIN OF TASKLIST_TYPE,
           TASKNAME(4) TYPE C, "Task administration
           RFCDEST LIKE RFCSI-RFCDEST
           END OF TASKLIST_TYPE.
    DATA: INFO LIKE RFCSI, C,  "Message text
          JOBS TYPE I VALUE 10,  "Number of parallel jobs
          SND_JOBS TYPE I VALUE 1,  "Sent jobs
          RCV_JOBS TYPE I VALUE 1,  "Received replies
          EXCP_FLAG(1) TYPE C,  "Number of RESOURCE_FAILUREs
          TASKNAME(4) TYPE N VALUE '0001',  "Task name administration
          TASKLIST TYPE TABLE OF TASKLIST_TYPE,
          WA_TASKLIST TYPE TASKLIST_TYPE.
    DO.
      CALL FUNCTION 'RFC_SYSTEM_INFO'
           STARTING NEW TASK TASKNAME DESTINATION IN GROUP DEFAULT
           PERFORMING RETURN_INFO ON END OF TASK
           EXCEPTIONS
             COMMUNICATION_FAILURE = 1
             SYSTEM_FAILURE        = 2
             RESOURCE_FAILURE      = 3.
      CASE SY-SUBRC.
        WHEN 0.
    Administration of asynchronous tasks
          WA_TASKLIST-TASKNAME = TASKNAME.
          CLEAR WA_TASKLIST-RFCDEST.
          APPEND WA_TASKLIST TO TASKLIST.
          WRITE: /  'Started task: ', WA_TASKLIST-TASKNAME COLOR 2.
          TASKNAME = TASKNAME + 1.
          SND_JOBS = SND_JOBS + 1.
          JOBS     = JOBS - 1.  "Number of existing jobs
          IF JOBS = 0.
            EXIT.  "Job processing finished
          ENDIF.
        WHEN 1 OR 2.
    Handling of communication and system failure
        WHEN 3.  "No resources available at present
    Receive reply to asynchronous RFC calls
          IF EXCP_FLAG = SPACE.
             EXCP_FLAG = 'X'.
    First attempt for RESOURCE_FAILURE handling
             WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.01' SECONDS.
          ELSE.
    Second attempt for RESOURCE_FAILURE handling
             WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.1' SECONDS.
          ENDIF.
          IF SY-SUBRC = 0.
            CLEAR EXCP_FLAG.  "Reset flag
          ELSE.  "No replies
            "Endless loop handling
          ENDIF.
        ENDCASE.
    ENDDO.
    Receive remaining asynchronous replies
    WAIT UNTIL RCV_JOBS >= SND_JOBS.
    LOOP AT TASKLIST INTO WA_TASKLIST.
      WRITE:/   'Received task:', WA_TASKLIST-TASKNAME COLOR 1,
            30  'Destination: ', WA_TASKLIST-RFCDEST COLOR 1.
    ENDLOOP
    FORM RETURN_INFO USING TASKNAME.
      RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'
        IMPORTING RFCSI_EXPORT = INFO
        EXCEPTIONS
          COMMUNICATION_FAILURE = 1
          SYSTEM_FAILURE        = 2.
      RCV_JOBS = RCV_JOBS + 1.  "Receiving data
        IF SY-SUBRC NE 0.
    Handling of communication and system failure
        ELSE.
          READ TABLE TASKLIST WITH KEY TASKNAME = TASKNAME
                              INTO WA_TASKLIST
          IF SY-SUBRC = 0.  "Register data
            WA_TASKLIST-RFCDEST = INFO_RFCDEST.
            MODIFY TASKLIST INDEX SY-TABIX FROM WA_TASKLIST.
          ENDIF.
        ENDIF.
    ENDFORM
    Note
    If you encounter problems, refer toTypical RFC problems and theirsolutions.
    Note
    Runtime errors:
    Note
    Runtime errors:
    CALL_FUNCTION_NO_RECEIVER:
    Data received for an unknown CPI-C connection.
    CALL_FUNCTION_DEST_TYPE:
    Destination type not allowed.
    CALL_FUNCTION_NO_DEST:
    Specified destination does not exist.
    CALL_FUNCTION_NO_LB_DEST:
    Specified destination (in load distribution mode) does not exist.
    CALL_FUNCTION_TABINFO:
    Data error (info internal table) in a Remote Function Call.
    CALL_BACK_ENTRY_NOT_FOUND:
    The called function module is not released for use in RFC.
    CALL_FUNCTION_FIELD_NOT_FOUND:
    The function parameter that you passed is not recognized on therecipient side.
    RFC_NO_AUTHORITY:
    The user does not have RFC authorization.
    CALL_FUNCTION_SINGLE_LOGIN_REJ:
    No authorization to log on as a trusted system. The error codeshave the following meanings:
    0) Valid security key but wrong logon data 1) Calling system is not a trusted system, or security key is invalid 2) User either does not have RFC authorization (authorization object S_RFCACL), or logged on as one of the protected users 'DDIC' or 'SAP*' 3) Timestamp of the logon data is invalid
    CALL_FUNCTION_DESTINATION_NO_T:
    Missing communication type (I for internal connection, 3 for R/3) in anasynchronous RFC
    CALL_FUNCTION_NOT_REMOTE:
    The function module called is not flagged as "RFC supported"
    CALL_FUNCTION_REMOTE_ERROR:
    An error occurred during the Remote Function Call. This has been loggedin the target system.
    CALL_FUNCTION_SIGNON_INCOMPL:
    The logon data for the user is incomplete.
    CALL_FUNCTION_SIGNON_INTRUDER:
    You cannot log onto a target system using an internal call.
    CALL_FUNCTION_SIGNON_INVALID:
    External RFC without a valid user name.
    CALL_FUNCTION_SIGNON_REJECTED:
    Attempt to log onto a target system without a valid user name. Theerror code can have the following meanings:
    1) Wrong password or invalid user ID
    2) User locked
    3) Too many logon attempts
    4) Error in authorization buffer (internal error)
    5) No external user check
    6) Invalid user type
    7) Validity period of user has expired
    CALL_FUNCTION_SYSCALL_ONLY:
    RFC without a valid user name only allowed when calling system functionmodules. For the meaning of the error codes, refer toCALL_FUNCTION_SINGLE_LOGIN_REJ.
    CALL_FUNCTION_TABLE_NO_MEMORY:
    No memory available for a table to be imported
    CALL_FUNCTION_TASK_IN_USE:
    Asynchronous RFC only: Task name already in use.
    CALL_FUNCTION_TASK_YET_OPEN:
    Asynchronous RFC only: The specified task is already open.
    CALL_FUNCTION_SNC_ERROR:
    Error reading the SNC information for the destination.
    CALL_RPERF_SLOGIN_READ_ERROR:
    No valid trusted system entry for the calling system.
    CALL_RPERF_SLOGIN_AUTH_ERROR:
    No trusted authorization for the RFC caller and trusted system.
    +
    Regards,
    Rich Heilman

  • How to call java program through ODI

    Hi,
    I have written java program which i want to run though ODI.My questions are as follows:
    1. At which place i need to put my code and jar files i.e. do i need to put my code on the machine where ODI is installed?
    2. which technology to use i.e. jython or java bean shell.
    3. Commands format for jython or java bean shell.
    Is there any book or forum to which i could refer to get a deeper knowledge about these as i am new to ODI.
    Thanks
    Abhi

    881195 wrote:
    Hi,
    I have written java program which i want to run though ODI.My questions are as follows:
    1. At which place i need to put my code and jar files i.e. do i need to put my code on the machine where ODI is installed?You need to place the JAR file at ODI's driver folder.
    2. which technology to use i.e. jython or java bean shell.You can use Jython or Java bean shell . I prefer Jython .
    3. Commands format for jython or java bean shell.In your procedure , set the technology to Jython .
    Write normal java commands ... like
    import <your_class_name>
    <you operation etc>
    >
    Is there any book or forum to which i could refer to get a deeper knowledge about these as i am new to ODI.
    Thanks
    Sutirtha

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

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • How to pass radiobuttons using a submit statements.

    Hi All,
    Can anyone tell me how to pass radiobuttons using Submit statement.
    My problem is that I am able to pass one select option and one parameter using the statement:
    submit (v_repid) to sap-spool without spool dynpro
                       spool parameters s_print_parms
                       using selection-screen '1000' WITH SELECTION-TABLE t_rspar_tab
                       and return.
    This selection screens got to check selections based on 2 radio buttons available in the selection screen which also i need to pass through SUBMIT.Please let me know how do i pass this to the Submit statement.
    Thankx in advance...
    Helpful answers will be rewarded fully...

    Hi Susanth,
                   Create Variant for the calling program, Give that variant( here in the below program variant for calling program that I created is VAR1) in the calling program in SUBMIT Statement.
    <b>
    CALLING PROGRAM:
    </b>
    data:
      w_variant(5) TYPE c VALUE 'VAR1'.
    SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
    <b>CALLING PROGRAM:</b>
    TABLES spfli.
    parameters:
          w_radio1 RADIOBUTTON GROUP g1,
          w_radio2 RADIOBUTTON GROUP g1.
    SELECT-OPTIONS s_table FOR spfli-carrid.
    WRITE '*************** This is Called program output **********************'.
    Hope this solves your problem.
    If you any query you are welcome.
    Regards,
    V.Raghavender.

  • Regarding SUBMIT Statement

    Hi,
    I am calling a batch job (B) (in back groung) using SUBMIT statement, from a report program (Say A). But I have to Pass some internal tables and few variable to the Batch job (B).
    Can someone tell me how I can pass the Internal tables and variables ? Is it possible to pass through SUBMIT statement only? Is there some other than the use of Import-Export statement?
    Thanks and regards,
    Pankaj Bist.

    Hi pankaj,
      SUBMIT <PROGRAM NAE>   =   ds_name            " Creating batch input session
                      WITH  fl_check  =   fl_check
                      WITH  os_xon    =   os_xon
                      WITH  xnonunic  =   xnonunic
                      WITH  callmode  =   callmode
                      WITH  max_comm  =   max_comm
                      WITH  pa_xprot  =   pa_xprot
                      WITH  anz_mode  =   anz_mode
                      WITH  update    =   update
                      WITH  xpop      =   xpop
                      WITH  xlog      =   xlog
                      WITH  xinf      =   xinf  AND RETURN.
    u can pass the variables like this.
    the variables which i have pass to the program all are the selection screen aprameteers of the program .
    I hope this will work for you.
    Thanks,

  • Passing internal table through Submit

    Hi,
    How do i pass an internal table through Submit statement.
    i dnt want to declare a select-options for this purpose.
    Is ther any other way??
    Answers will be rewarded
    Regards,
    Rohan

    Hello Rohan...
    to export a table use the following
    DATA: wa_indx TYPE indx.
      EXPORT tab = itab TO DATABASE indx(xy) FROM wa_indx CLIENT
      SY-MANDT
      ID 'DETAILLIST'.
    to import use this
    imports from database the list sent by the calling program
      IMPORT tab = itab FROM DATABASE indx(xy) TO wa_indx CLIENT sy-mandt
      ID 'DETAILLIST'.
    deletes the data to save wastage of memory
      DELETE FROM DATABASE indx(xy)
        CLIENT sy-mandt
        ID 'DETAILLIST'.

  • Reg:Submit statement Return Internal Table

    Hi Team,
    I have a query to return the internal table from the called program via SUBMIT statement to the calling statement ??
    Example : Thing is that consider reports A and B , Report B is getting called from report A where in B we have one internal table full of data that i need to pull to report A and there i need to process it.
    How can i achieve this?
    Please let me know the possible ways.
    Karthik.S

    Hi karthik,
    SUBMIT .... AND RETURN EXPORTING LIST TO MEMORY.
    Then use FM LIST_FROM_MEMORY.
    Thanks,
    Anil

  • Create spool for background jobs which uses submit statement

    Hi Gurus,
                 I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
    Thanks in advance, <REMOVED BY MODERATOR>
    Regards,
    Srinivas.
    Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PM

    hi check this link ...
    Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
    DATA: number TYPE tbtcjob-jobcount,
          name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
    sy-subrc  Meaning
    0            Background task scheduled successfully.
    4            Scheduling cancelled by user on the selection screen.
    8            Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
    12          Error in internal number assignment.
    regards,
    venkat.
    Edited by: venkat  appikonda on Mar 18, 2008 6:32 PM

  • SUBMIT statement doesnt work

    hi
    I want to execute program RIMODGEN ( CFM1 transaction ) with some values filled in MA_MATNR
    But this program is not able to execute the program with SUBMIT statement and return & close the job, please tell me whats the problem with this....
    Points for all helpful answers
    * Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    * Insert process into job
    * CALL TRANSACTION
    SUBMIT cfm1  with MA_MATNR in MA_MATNR
                      WITH I_MODID  = 'TEST_RAJ'
                      WITH I_LOGSYS = 'D41030'
                      with I_APPL   = 'TEST_RAJ'
                      user sy-uname
                      via job jobname
                      number jobcount
                      and RETURN.
      if sy-subrc > 0.
          message e200(zz) with 'RIMODGEN call failed'. "error processing
      endif.
    * Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
         MESSAGE i200(zz) with 'Done !!'.    "error processing
         stop.
      endif.

    Rob and I were pointing out that you have the transaction name in the SUBMIT statement in your code that you posted above, so if you are not currently using the program name in your program, make sure that you are.  Also, you may want to use the extension  "     to sap-spool without spool dynpro"  of the SUBMIT statement, the ouput will then go to the spool.  Here is an example program where I am creating a background job .
    report zrich_0004 .
    data:   sdate type sy-datum,
            stime type sy-uzeit,
            l_valid,
            ls_params like pri_params,
            l_jobcount like tbtcjob-jobcount,
            l_jobname  like tbtcjob-jobname.
    start-of-selection.
    * Get Print Parameters
      call function 'GET_PRINT_PARAMETERS'
           exporting
                no_dialog      = 'X'
           importing
                valid          = l_valid
                out_parameters = ls_params.
    * Open Job
      l_jobname = 'ZRICH_0005'.
      call function 'JOB_OPEN'
           exporting
                jobname  = l_jobname
           importing
                jobcount = l_jobcount.
    * Submit report to job
      submit zrich_0005
           via job     l_jobname
               number  l_jobcount
           to sap-spool without spool dynpro
               spool parameters ls_params
                  and return.
    * Kick job off 30 seconds from now.
      sdate = sy-datum.
      stime = sy-uzeit + 30.
    * Schedule and close job.
      call function 'JOB_CLOSE'
           exporting
                jobcount  = l_jobcount
                jobname   = l_jobname
                sdlstrtdt = sdate
                sdlstrttm = stime
    *            strtimmed = 'X'
    Regards,
    Rich Heilman         .

  • How to call external programs?

    I have seen people call external programs through LabVIEW and was curious what functions you could use to do this.
    I'm pretty sure its using one of the ActiveX functions  or maybe 'open application reference .vi'.
    Can anyone tell me (or show me) a quick example of how to open an external program (ie excel,  notepad, etc) programatically
    Cory K
    Solved!
    Go to Solution.

    Cory K wrote:
    Where did they get this:
    Kudos for going from "I don't know to start" to "Let's stump Ben" with only the second post to this thread.
    I either copy it from an example or try to browse to it.
    NOTE:
    If you plan to work with MS ActiveX objects, I found it very helpful to do a custom install of Office and make sure the help files for VBA are loaded. These will at the least give you an idea of what the methods are and what parameters go with each.
    Ben
    Message Edited by Ben on 12-31-2008 11:09 AM
    Message Edited by Ben on 12-31-2008 11:13 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Browse.PNG ‏24 KB

  • Avoid ALV output screen in submit statement

    hello,
    I have created one FM.in that FM i am calling one zreport using submit statement as i want to access that zreport's internal table.so i have done that using IMPORT and EXPORT statement and i am getting values in my FM.
    but my problem is when i execute that FM it stops and display the ALV output of zreport and then when i press back button it gives me FM's output.i dont want that ALV output.can anybody help me that how to omit this output screen?
    regards
    soniya s.

    Hi,
    Use option EXPORTING LIST TO MEMORY with statement SUBMIT.
    Regards,
    Nikhil
    Edited by: Nikhil Kayal on May 13, 2009 1:32 PM

  • SUBMIT STATEMENT PROBLEM

    I AM USING SUBMIT FOR IDOC TRANSACTION  WE05 , THE STATEMENT IS BELOW
              SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
                        VIA SELECTION-SCREEN
                         WITH docnum IN r_doc AND RETURN.
    the problem is that when i go directly to weo5 and enter any idoc it is showing me the output but when i go through
    submit statement it is giving me error 'NO IDOC FOUND' . please suggest

    ELSEIF rs_selfield-fieldname = 'DOCNUM'.
            READ TABLE lit_final INTO ls_final WITH KEY docnum  = rs_selfield-value.
            IF sy-subrc = 0.   "if succesful
    *          SET PARAMETER ID 'DCN' FIELD rs_selfield-value.
              seltab_wa-selname = 'CREDAT'.
              seltab_wa-kind  = 'S'.
              seltab_wa-sign    = 'I'.
              seltab_wa-option  = 'EQ'.
              seltab_wa-low  = space.
              seltab_wa-high  = space.
              APPEND seltab_wa TO seltab.
              CLEAR seltab_wa.
              r_doc-sign    = 'I'.
              r_doc-option  = 'BT'.
              r_doc-low  = rs_selfield-value.
              APPEND r_doc.
              CLEAR seltab_wa.
              SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
                        VIA SELECTION-SCREEN
                         WITH docnum IN r_doc AND RETURN.
            ENDIF.

Maybe you are looking for