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

Similar Messages

  • Pass parameter to program (with LDB) submitted in background

    Hello,
    For a particular requirement, I need to submit the program RPLPAY00 in background.
    I need to extract data for the 'Current Year' which appears as a radiobutton on screen
    However, it comes from the logical database PNP
    I have written code as follows
    *& Report  ZRUN_RPLPAY00
    *& Author  : Kris Donald
    *& Date    : 15-05-2009
    *& Purpose :
    REPORT  ZRUN_RPLPAY00.
    DATA: LV_JOB_NAME         LIKE TBTCO-JOBNAME,
    LV_JOB_NR           LIKE TBTCO-JOBCOUNT,
    LV_JOB_RELEASED     TYPE C,
    LV_JOB_START_SOFORT TYPE C,
    LV_PRINT_PARAMETERS TYPE PRI_PARAMS.
    LV_JOB_NAME = 'RPLPAY00'.
    CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          JOBNAME          = LV_JOB_NAME
        IMPORTING
          JOBCOUNT         = LV_JOB_NR
        EXCEPTIONS
          CANT_CREATE_JOB  = 1
          INVALID_JOB_DATA = 2
          JOBNAME_MISSING  = 3
          OTHERS           = 4.
      IF SYST-SUBRC = 0.
    *submit job with all the selection screen params...
        SUBMIT (LV_JOB_NAME)
            WITH PNPTIMR1 = ''
            WITH PNPTIMR3 = 'X'
            with PNPBEGDA = ''
            with PNPBEGPS = ''
            with ALV_LIST = 'X'
            USER sy-uname
           VIA JOB LV_JOB_NAME NUMBER LV_JOB_NR AND RETURN.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              JOBCOUNT             = LV_JOB_NR
              JOBNAME              = LV_JOB_NAME
              STRTIMMED            = 'X'
            IMPORTING
              JOB_WAS_RELEASED     = LV_JOB_RELEASED
            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 SYST-SUBRC <> 0.
            MESSAGE I162(00) WITH
            'An error occured while closing the background job.'.
            STOP.
          ENDIF.
        ENDIF.
      ENDIF.
      SKIP 1.

    However when I check the output log it shows the following message
    'Pay scale grpg for allowances for 00040011 is not defined on 20040728'
    If 'Current year' was selected properly, it would have read as
    'Pay scale grpg for allowances for 00040011 is not defined on 20090101'
    Does anyone know how I can pass the parameters properly to the program in background ?

  • 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

  • Submit a program with two variants

    Hi all,
    There is one program which needs to run everyday with two different variants
    ( For this i need to have two jobs ).
    Now, i need to write a new program which submits the above program with two variants. How do i do it?
    Thanks
    Abhijith H

    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

  • Needs to submit a program with Create icon

    Hi experts,
    I need to submit SAPRCKCC. Once the program SAPRCKCC got executed, in the selection screen i need to click Create Icon after that i need to pass the required values.
    The requirement is,
    How to submit SAPRCKCC with clicking of create icon
    Can anyone guide me.
    Mohana

    AT SELECTION-SCREEN.
      IF sy-ucomm <> 'CREATE'.  " FC code for your button.
      SUBMIT <Pgname> VIA SELECTION0-SCREEN
                    WITH SELECTION-TABLE
    ENDIF

  • How to Run std program with a specific variant for specific user?

    Hi guys
    We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how?
    one options we thought about was to create a transaction in SE93 and define the program to run with a predefined varaint and assign the new custom tcode to the user profile. But we have many different users and we will end up with creating many transactions which we would like to avoid. Is there any other option to control the std program such that each user can run the program only with a pre-defined varaint and the one which only the user is suppoed to run. thanks in advance.

    We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how
    you can do this..
    You can create a Custom table
    userid     keyfield
    program  keyfield
    variant    keyfield
    programdesc
    Make the table Maintaintable(usnig table maintenance )
    Now create another Program
    It takes input of the Program name( using selection screen)
    LOGIC
    in side that place a logic ,
    Based on the user name  and program name Get the variant name from above table
    Now Submit the program with the variant you have selected above.
    Use Variant Addition when you use SUBMIT
    So now program executed based on user variant.
    Now you create a Transaction for this program.
    When use Runs the Transaction , user needs to input the Program name which he wants to execute.
    and Output will be shown based on the variants
    Regards
    Vijay Babu Dudla

  • Submit program with selection screen parameters - getting blank values

    Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN  )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN  ) but the value is blank in selection screen. I'm using the below code for this.
    SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR   SIGN 'I'
                      WITH WERKS_GL EQ I_WERKS   SIGN 'I'
                      WITH PLSCN    EQ I_TPLSCN  SIGN 'I'
        via selection-screen        AND RETURN.
    Could anyone please help me how to display value '000' rather than blanks.
    thanks in advance.

    If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
    SUBMIT rmcpamrp
      WITH matnr_gl = i_matnr
      WITH plscn    = i_tplscn
      WITH werks_gl = i_werks
      via selection-screen       
       AND RETURN .
    If I_MATNR, I_TPLSCN and I_WERKS are of type range then try  with
    SUBMIT rmcpamrp
      WITH matnr_gl IN i_matnr
      WITH plscn    IN i_tplscn
      WITH werks_gl IN i_werks
    via selection-screen       
       AND RETURN
    Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM

  • 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

  • Submitting a dynamic program with layout name

    Hi,
    I searched many blogs and the SDN forum but couldn't find a solution.
    I need to know the layout fields of an ALV report for a later usage. Let me explain it with code:
    I used below code to extract data of a dynamic program.
    cl_salv_bs_runtime_info=>set(
      EXPORTING display  = abap_false
        metadata = abap_true
        data     = abap_true ).
      Submit (program)  USING SELECTION-SET variant EXPORTING LIST TO MEMORY
                AND RETURN.
      TRY.
          cl_salv_bs_runtime_info=>get_data_ref(
      IMPORTING r_data = lf_ref ).
          ASSIGN lf_ref->* TO <lt_data>.
        CATCH cx_salv_bs_sc_runtime_info.
          MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
      ENDTRY.
      cl_salv_bs_runtime_info=>clear_all( ).
      CREATE DATA lf_ref1 LIKE LINE OF <lt_data>.
      ASSIGN lf_ref1->* TO <lt_line>.
    What I need is to submit program with a (known) layout. If it is not possible, how can i modify the ALV report to fit a layout's display properties. (If I can manage to get -dynamic program- layout's visible fields, it will work too.)
    Thank you.

    Hi ,
    Check this LINK  you can take help from this
    create dynamic varient and pass  to Submit program .
    [how to create a variant dynamically and get it?;
    OR  :
    you can use function module to get layout names and  reprot 
    ranges: lr_report for ltdx-report,
              lr_handle for ltdx-handle,
              lr_log_group for ltdx-log_group,
              lr_username  for ltdx-username,
              lr_variant   for ltdx-variant,
              lr_type      for ltdx-type.
    call function 'LT_VARIANTS_READ_FROM_LTDX'
        exporting
          i_tool          = r_tool
          i_text          = r_text
        tables
          et_variants     = rt_variants
          it_ra_report    = lr_report
          it_ra_handle    = lr_handle
          it_ra_log_group = lr_log_group
          it_ra_username  = lr_username
          it_ra_variant   = lr_variant
          it_ra_type      = lr_type
        exceptions
          not_found       = 1
          others          = 2.
    regards
    Deepak.
    Edited by: Deepak Dhamat on Jan 23, 2012 8:18 AM

  • Call report selection screen in module pool program with tab strip control

    Hi,
    Could anyone explain in detail to call report selection screen in module pool program with tab strip control.
    Thanks
    Mano

    Hi,
    Refer std program:
    demo_sel_screen_in_tabstrip.
    demo_sel_screen_with_tabstrip.
    Call your program with SUBMIT stmt form module program.
    Reward points if this Helps.
    Manish

  • 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

  • Working with LDB without selection screen

    can' we take input through file without any selection screen when we are working with LDB?
    Please focus on this.
    Regards
    vamsi.

    Hi,
    yes, u can make use of :
    SET PARAMETER ID command.
    SET PARAMETER ID pid FIELD dobj.
    Effect:
    This statement sets the content of the SPA/GPA parameter specified in pid to the content of the data object dobj. For pid, a flat character-type field is expected that can contain a maximum of 20 characters, which cannot be exclusively blank characters. pid is case-sensitive. For dobj, a flat, (as of release 6.10 character-type) field is expected, whose binary content is transferred in an unconverted format.
    If the SPA/GPA parameter specified for the current user in pid does not yet exist in the SAP memory, it is created. If the SPA/GPA parameter has already been created for the current user, its value is overwritten.
    In a program, SPA/GPA parameters can only be created or assigned values if a name exists for them in the table TPARA. The extended program check reports an error if it can statically determine that a name specified in pid is not contained in the database table TPARA. ist.

  • Calling standard program with logical database

    Hi all,
    I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen.  I want to fill some of the select-options programmatically. 
    My code is somethig like this
          submit RPTBAL00
            with pernr-pernr = 'XXX'
            with pernr-pnpbegda = '20020101'
            with pernr-pnpenddaa = '99991231'
                          and return.
    but the report gets called with defaults.
    Does anyone know what I am doing wrong?

    Hi
    I seem your code is right, but I don't understand which elements are filled with default values.
    Anyway this is a little code to submit a report with logical database:
    Co.Ge.
      loop at so_umskz.
        move-corresponding so_umskz to selopt.
        append selopt  to frange-selopt_t.
      endloop.
      if sy-subrc = 0.
        frange-fieldname = 'UMSKZ'.
        append frange to range-frange_t.
      endif.
      refresh frange-selopt_t.
      loop at so_zlsch.
        move-corresponding so_zlsch to selopt.
        append selopt  to frange-selopt_t.
      endloop.
      if sy-subrc = 0.
        frange-fieldname = 'ZLSCH'.
        append frange to range-frange_t.
      endif.
      if not range-frange_t[] is initial.
        range-tablename = 'BSIK'.
        append range to trange.
        call function 'FREE_SELECTIONS_RANGE_2_EX'
          exporting
            field_ranges = trange
          importing
            expressions  = texpr.
      endif.
      submit rfitemap
              with ................
              with free selections texpr and return.
    Max

Maybe you are looking for

  • Is there something wrong with the size estimation of AME?

    for some reason, i have a SD Blu-Ray project going, the total amount of footage is 23hr 19min. i created  a timeline with all assetts in one timeline, i chose to encode that, finetuned the settings to where the media export combined is exactly 45 gb,

  • Acrobat/Reader and PADES (Digital Signatures)

    I've read the document that James King of Adobe published and made the configurations to make Acrobat PADES compliant. However when I sign a document and inspect the generated CMS package inside the PDF, the signing-certificate value in Signed-Attrib

  • Vibration on navigation and battery?

    I am trying to extend the battery duration, should i get rid of the brief vibration when u navigate the interface? doesnt it suck battery uselessly? for example many times when u press the back button etc. is there a way to disable it? Solved! Go to

  • EJBC error when using Commons Logging API

    All, I am using weblogic 7.0 and Commons with log4j.When I run the ejbc I get the following error. There is no package called Lorg in my classpath. Any suggestions on why this is happening? Thanks in Advance, Chandrav [java] ERROR: Error from ejbc: C

  • I can't open any pictures sent to me SMS or IMS text on my iPhone 6.

    I can't open any pictures sent to me SMS or IMS text on my iPhone 6. The text bubble shows downloading, but the pictures aren't opening.