Submit Z program in lsmw

Hi all,
I need to run a Z program right after a LSMW.
I've tried to insert a "submit ZPROG" in the LSMW "end_of_transaction" step but it doesn't work.
Does somebody has an idea if it's possible ?
Or, is there any workaround ?
Thanks in advance for your help
Br,
Pierre

Hi Thomas,
The aim of my LSMW is to create a "HR function".
One of the dynpro reached uses a BADI and more specificaly the "IN UPDATE" method.
My problem is that, with LSMW, this "IN UPDATE" method is only run at the end of the LSMW and so, the data are missing.
So I was thinking of exporting data to memory in the "AFTER INPUT" method and then, import and treat everything in my program.
But you're right, my program should be called in the "end of processing". But I'm not sure that will be enough.
Br,
Pierre

Similar Messages

  • How to submit a Program in Background without wait ?

    hi experts,
        I have one requirement in which i want to call another executable program from one program by passing some parameters to the calling program from called program. <b>I dont want to wait till the executatio of the calling program gets over.</b>i just want to submit the program & <b>wants to continue with my calling program</b>.
    i am not bothered with the results of the called program.
         How to do this...
    if possible pl. send me the code. especially i am using some parameters & internal tables to be passed to the called program from calling program.
    Regards,
    Umesh

    Hi Umesh,
    You can schedule a job programatically .. Please find below the steps..
    This will schedule a background job (and this you can view in Sm37) and returns control to the calling program.
      DATA: jobnumber TYPE tbtcjob-jobcount,
                jobname   TYPE tbtcjob-jobname.
    Set the job name
    jobname = 'xxx'.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname  = jobname
           IMPORTING
                jobcount = jobnumber
           EXCEPTIONS
                OTHERS   = 0.
      SUBMIT reportname USER sy-uname
                                    VIA JOB jobname
                                   NUMBER jobnumber
                                   WITH  param1 =   "fill the parms/sel fields with new values
                                   WITH  Param2=     "fill the parameters/sel fields
         AND RETURN.
       CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount  = jobnumber
                jobname   =jobname
                strtimmed = 'X'
           EXCEPTIONS
               OTHERS    = 0.
    Thank You.
    Regards,
    Uma

  • Submit a program to execute in background.

    Hi Everyone,
    Is there a way to submit a program to execute in background. So that the runtine is fast. Any help on this will be great.
    Thanks,
    Prabhu.

    Hi,
    Check this code -
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    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
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "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.
                                           "error processing
      endif.
    URL: http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
    Hope this code snippet helps you!

  • How to submit a program after completion of a background job

    Hi Experts,
    I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
    Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
        CALL TRANSACTION 'ZSAPRCK60' USING    zbdcdata
                                OPTIONS  FROM g_s_options
                                MESSAGES INTO msg_tab.
    SUBMIT SAPRCK10    VIA SELECTION-SCREEN
                        WITH kalaid = p-kalaid
                        WITH kaladat = sy-datum
                        WITH PARALLEL = 'X'
                        WITH SERVNUM = '10'
                        WITH backgr = 'X'
                        AND RETURN.
    Mohana

    Hi,
    There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
    do.
    call fm BD****STATUS
    IF STATUS (IMPORT PARAMTER) eq 'F'.
    exit.
    endif.
    enddo.
    Regards,
    Nagaraj

  • How to pass the value to "Assignment" when submit the program RFITEMGL?

    Hello friends,
    I want to submit program RFITEMGL  (t-code FBL3N) with some screen fields, some fields are OK to fill such as u201COpen at key dateu201D, u201CG/L accountu201D and u201CCompany codeu201D。 But for the field "Assignment" (It will appear after cilck Dynamic Selection), I don't know how to pass value to it.
    Could you help me about how to pass the value to "Assignment" when submit the program RFITEMGL  (t-code FBL3N) ?
    Thanks a lot!

    Hi,
    Well you can create a small BDC.
    Regards,
    Harsh Bansal

  • Need to submit a program with a variant

    Hi all,
    This is my code i need to submit RSIRCCON program to this program with a variant . I have created a variant with a name "VARIANT1" . After excuting this program am getting an error message "VARIANT VARIANT1 does not exist " .
    Can any one help me to resolve this issue .
      Z_RSIRCCON_2                                                *
    REPORT  Z_RSIRCCON_2  NO STANDARD PAGE HEADING
                                       LINE-SIZE  255
    TABLES                                                              *
                                       LINE-COUNT 65.
    TABLES: somlreci1.
    *Global Variables                                                      *
    DATA: repository(255) TYPE C,
          L_PROGRAMM LIKE RS38M-PROGRAMM,
          variant1 like RS38M-SELSET.
    l_programm = 'Z_RSIRCCON_2'.
    variant1   = 'VARIANT1'.
    SELECTION SCREEN                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1  WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_repos FOR repository.
    PARAMETER:p_single AS CHECKBOX USER-COMMAND run,
              p_multi AS CHECKBOX USER-COMMAND run,
              p_run AS CHECKBOX USER-COMMAND run.
    SELECTION-SCREEN END OF BLOCK  b1.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-043.
    PARAMETER :p_esub TYPE repository.
    SELECT-OPTIONS:p_email  FOR somlreci1-receiver MODIF ID sc6 .
    SELECTION-SCREEN END OF BLOCK  a1.
    START-OF-SELECTION                                                  *
    CALL FUNCTION 'RS_PROGRAM_POPUP_VARIANT'
      EXPORTING
        progname               = l_programm
        VARIANT                = VARIANT1
      DEBG                   = ' '
      MESSAGE_ON_POPUP       = ' '
    IMPORTING
      OK_CODE                =
      NEW_VARIANT            =
    EXCEPTIONS
      NO_VARIANT             = 1
      OTHERS                 = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    submit RSIRCCON VIA SELECTION-SCREEN using SELECTION-SET 'VARIANT1' AND RETURN.
    null

    Hi,
    You cannot user the variant of 'Program 1' to call the 'Program 2'.
    When you write the statement
    SUBMIT RSIRCCON VIA SELECTION-SCREEN USING SELECTION-SET 'VARIANT1' AND RETURN.
    it means that you are trying to submit the program RSIRCCON with the selection screen variant 'VARIANT1'. SAP expect this variant to be of program RSIRCCON not your calling 'Z' program. Since program RSIRCCON does not have any selection-screen, you can not create a variant and thus you cannot submit it with selection-set variant.
    Please refer to the documentation for command 'SUBMIT' for more information.
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
    Regards,
    RS

  • How to add zee program to lsmw.

    HI all,
    how to add the z program to lsmw.....
    please can any one specify the process of embedding the
    program to lsmw.

    Hi Ramya,
    if you want to see the result it should run first.
    after adding abap program to process chain, activate it.
    now right click on process chain start --> display variant --> change selection.
    check what is the start condition, if it is nto in immediate then comback
    click on edit --> change selection
    select immediate --> unchek the periodic values. and save. come back
    again click on save. come back.
    now schedule your process chain by clikc on clock symbol.
    after successfull completion of your process chain you can check in SE16
    Regards,
    Venkatesh

  • APP-ALR-04050 Alert was not able to submit concurrent program

    Hi Friends,
    Can someone please help me in solving the below issue?
    I'm using Event alert for submitting a concurrent program based on insertion/updations on po_requisition_headers_all table. This alert is not working when I am creating a Purchase Requisition manually in Requisitions screen, it is not invoking the concurrent program. Check event alert is failing with the error 'APP-ALR-04050 Alert was not able to submit concurrent program'.
    But when I am creating a PR using an interface then the alert is working fine and submitting program.
    oracle version is R12.
    Alert SQL query:
    Select prh.segment1,
              prh.org_id
    into &p_in_pr_num,
            &p_in_org_id
    from po_requisition_headers_all prh
    where prh.authorization_Status IN ('APPROVED','CANCELLED')
    and prh.attribute_category = 'Sales Driven'
    and prh.org_id = :ORG_ID
    and orh.rowid = :ROWID
    Kindy help me in resolving this issue. Thank you in advance.
    Thanks
    Sravana

    Hi Sravana,
    Are you running on 12.0 release? Please provide you environment details.
    Please see:
    Oracle Applications Technology Software Updates, Release 12.0.4 (Doc ID 466974.1)
    Search for: ALERT WITH CONCURRENT REQUEST ACTION ERRORS WITH APP-ALR-4050
    I suggest you raise an SR for the respective issue.
    Thanks &
    Best Regards,

  • SET/GET not working when I submit one program into Main program.

    Hi All,
    I am using set/get parameter as follows but somewht it is not working.. Please help.
      IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
        set parameter id 'AJN' field lf_jobname.
        set parameter id 'AJC' field gf_jobcount.
      ENDIF.
      SUBMIT   zace_interface
        USER   sy-uname
        VIA    JOB lf_jobname
        NUMBER gf_jobcount
        WITH   SELECTION-TABLE lt_seltab
      TO     SAP-SPOOL
        AND    RETURN.
    in the zace_interface program I have another submit program
        submit zrsbdcsub and return
                        user 'ZACE_INTERFACE'
                        with mappe eq lf_group
                        with von eq sy-datum
                        with bis eq sy-datum
                        with fehler eq space
                        with logall eq co_true.
    ad inside this submit im using
                  get parameter id 'AJN' field v_jobname.
                  get parameter id 'AJC' field v_jobcount.
    but i am not able to get the values into v_jobname & v_jobcount.
    Can you please help me in this regard. how i will get the values in v_jobname & v_jobcount.
    Thanking you in advance
    Regards,
    Prashant

    Hi..,
    any way u r executing the programs in the same session but between diff. internal sessions u can use the IMPORT and EXPORT options ( ABAP MEMORY )
    or do one thing...
    <b>In the first program Copy these fields into a file in the <b>application server</b>,, and in the Second submit program u retrieve these variable values from the Application server file into these two variables!!</b>
    just now i have solved one of the issues of this Kind by using an Application server file.
    In the first program..
    IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
    OPEN dataset 'FILE' for output in text mode encoding default.
    transfer lf_jobname to 'FILE'.
    transfer gf_jobcount to 'FILE'.
    CLOSE dataset 'FILE'.
    ENDIF.
    and instead of using the GET parameters in the second program ..
    OPEN dataset 'FILE' for input in text mode encoding default.
    read dataset 'FILE' into v_jobname.
    read dataset 'FILE' into v_jobcount.
    CLOSE dataset 'FILE'.
    This has solved my problem !!!!! hope this helps u also!!
    regards,
    sai ramesh

  • Using Program RFBIBL00 ( LSMW)

    Hi ALL,
      I am trying to create journal upload in the transaction FB01. I am using LSMW to upload the data.
    while uploading i have Header data and Item data.
    <b>I am using standard batch input method and program is RFBIBL00.</b>
    <b>Header data conists of fields.
    1. Document date 2. Posting date 3. Type  4. Company code
    Item data consists of fields.
    1. Posting key 2. account  3. amount   4. taxcode   5. costcenter</b>
    <b>So whether i have two prepare two excel files.?</b>
    so how to link in LSMW with excel files.
    can anybody explain step by step procedure to create this journal upload using LSMW thru program RFBIBL00.
    Points will be awarded.
    Regards,
    vinoth.

    hi zarina,
           please send me the documents to my mail also
    ([email protected]),, waiting for your mail
    thanks in advance ,,
    krishna
    Message was edited by:
            Krishna Ramasamy

  • Submit a program with LDB

    Hi,
    My Issue is when I execute a program (ZRHECM_PRINT_CRS Copy of  RHECM_PRINT_CRS) directily It is generating the output for me in the form of xstring, But when I submit it with same parameter inside a function module It is not going to (get) statement.
    This program is using pnpce(LDB)
    Is there a problem in submiting a program Using LDB?
    Here is what  I Submit .What should be done ?
    SUBMIT  zrhecm_print_crs  WITH pnppernr-low    = pernr
                                WITH PNPTIMED        = PNPTIMED
                                WITH p_carea         = p_carea
                                WITH p_ccatg         = p_ccatg
                                WITH p_cplan         = p_cplan
                                WITH p_crevi         = p_crevi
                                WITH pnpbegda        = begda
                                WITH pnpendda        = endda
                                WITH pnpstat2-low    = stat2
                                WITH pnpbtrtl-low    = btrtl
                                WITH pnpwerks-low    = werks
                                WITH pnppersg-low    = persg
                                WITH pnppersk-low    = persk
                                AND RETURN.

    You don't need two jobs, you can have 1 job with two steps,  each step would call the progam with the different variant.
    If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement.  Here VARIANT1 is the name of a variant.
    SUBMIT ZREPORT01
           USING SELECTION-SET 'VARIANT1'
           AND RETURN.
    Regards,
    Rich Heilman

  • Submit dynamic program in ABAP

    Hi,
    I have to take the name of the program from the user in parameter on the selection screen and then call it. for this purpose i have used SUMBIT stmt as follows:
    parameters : p_pname(15),        "program name
             p_var(15).              " name of the varaint
    start-of-selection.
    SUBMIT p_pname with SELECTION-SET eq p_var.
    But the above code gives a dump stating the program p_pname doesn't exist.
    Kindly tell me how should this be done?
    Regards,
    Mansi.
    Edited by: SAP USER on Jul 10, 2008 10:09 AM

    Hi,
    Refer below code
        SUBMIT zk_ra_enhancement "TO SAP-SPOOL
               "IMMEDIATELY 'X'
               "WITHOUT SPOOL DYNPRO
               USING SELECTION-SCREEN 1000
               WITH cn_pspnr CP st_wbs-low
               WITH koagr = c_cost_ele_grp
               WITH r_budat BETWEEN g_first_date_in_period AND g_last_date_in_period
               AND RETURN.
    Regards,
    Prashant

  • Submit a program but I donu00B4t want to see the slection screen of this progra

    Hi expert.
      I have a problem. I am calling a program B from another program A using a SUBMIT statment. I am passing the parameters of the selection screen of the program B with the instruction VIA SELECTION SCREEN. The problem is that the program B shows a informatin message anf the selection screen appears; and i don´t weant this, I don´want that the selection screen apeear. Spme body can say me how can I make this??
       Thanks

    Hello,
    If you use VIA SELECTION-SCREEN the screen will be showed, try using USING SELECTION-SCREEN.
    *... VIA SELECTION-SCREEN *
    Effect
    If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed
    *... USING SELECTION-SCREEN dynnr *
    Effect
    This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
    If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
    If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
    Example:
    The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    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.

  • Submit a program and skip output or dont show the output (alv list)

    hi,
    is it possible to use the submit command and skip output or don't show the output (alv list) ?
    Regrads
    ertas

    Hi all,
    I get the message
    REPORT  ZTEST.
    DATA: jtab TYPE TABLE OF sbook,
          wa_jtab LIKE LINE OF jtab,
          jtab2 TYPE z_incident_li OCCURS 0 WITH HEADER LINE.
    submit Z_INCIDENT_LIST EXPORTING LIST TO MEMORY AND RETURN.
    IMPORT lt_incident_res TO  jtab2 FROM MEMORY ID 'table'.
    LOOP AT jtab2 .
      WRITE / jtab2-RECN.
    ENDLOOP.
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          12.06.2008 17:54:00
    Short text
         Exception condition "CNTL_ERROR" raised.
    What happened?
         The current ABAP/4 program encountered an unexpected
         situation.
    Error analysis
         A RAISE statement in the program "CL_GUI_CONTROL================CP" rais
          exception
         condition "CNTL_ERROR".
         Since the exception was not intercepted by a superior
         program, processing was terminated.
         Short description of exception condition:
         For detailed documentation of the exception condition, use
         Transaction SE37 (Function Library). You can take the called
         function module from the display of active calls.

  • Submit to program RKO7KO8G

    Hi ,
    Iam sumitting the data from a program to sap standatd program RKO7KO8G
            SUBMIT rko7ko8g USING SELECTION-SCREEN '1000'
            WITH SELECTION-TABLE t_rsparams
           WITH KOKRS EQ 'A001'
            WITH variant EQ 'TEST1'
             WITH PERIO EQ '008'
             WITH GJAHR EQ '2009'
             WITH VAART EQ ''1'
             WITH ausf EQ 'X'
            VIA JOB v_jobname NUMBER v_jcnt
            AND RETURN.
    while i run the program in the foreground(debugging mode) the value in the variant is correct with value'TEST1'.
    but while i run the program in the background the value in the variant is taken as default value like 'TESTDEFAULT'
    Please help me out how to solve this issue.

    Hi
    SUBMIT rko7ko8g USING SELECTION-SCREEN '1000'
    WITH SELECTION-TABLE t_rsparams
    WITH KOKRS EQ 'A001'
    WITH variant EQ 'TEST1'
    WITH PERIO EQ '008'
    WITH GJAHR EQ '2009'
    WITH VAART EQ ''1'
    WITH ausf EQ 'X'
    VIA JOB v_jobname NUMBER v_jcnt
    AND RETURN.
    In your Job itself maintained the required Varaint.
    Regards,
    Sreeram

Maybe you are looking for