Submit + destination

hi All,
I have a Z Function Module(RFC enabled) which passes the Program name its variant and the Destination.
Inside this FM it call the JOB_OPEN Submit and JOB_CLOSE FM to trigger the report of different system.
i mean if i m in sytem ABC and i want to execute a report on Sytsem on System XYZ then this FM works fine. Its is created by me and working fine sice last 3-4 year.
Now i ahve a reqirement to delete this FM if there is any SAP Standard functinality exist in ECC 6.0 which
can trigger the report at different destination.
Que-My question is How to trigger a report at different destination .I need SAP Standard  functinality of ECC6.0. please help me.
Thanks in Advance
regards,
Saurabh T

This will give you an idea of how it works. Save the file and double click on it to open in IE.
<html>
<head></head>
<body>
<form name="myForm" method="GET" action="servlet/InsertRecords">
<P>
<INPUT TYPE="RADIO" NAME="Radio1" VALUE="1" onClick="onClickFunction(1)" >Insert Record
<BR>
<INPUT TYPE="RADIO" NAME="Radio1" VALUE="2" onClick="onClickFunction(2)" >Delete Record
<BR>
</P>
</form>
</body>
<Script Language="JavaScript">
function onClickFunction(inVar) {
   if (inVar == 1) { document.myForm.action="servlet/InsertRecords";
                     document.myForm.submit(); }
   if (inVar == 2) { document.myForm.action="servlet/DeleteRecords";
                     document.myForm.submit(); }
</script>
</html>

Similar Messages

  • How to link a radio button selection to a submit destination ?

    Hi,
    I am working on a JSP page. Depending on the check from a radio button on a form, the form will be submitted to a different destination. Does anyone know how to do that? Any code samples?
    Thanks!
    wyp

    This will give you an idea of how it works. Save the file and double click on it to open in IE.
    <html>
    <head></head>
    <body>
    <form name="myForm" method="GET" action="servlet/InsertRecords">
    <P>
    <INPUT TYPE="RADIO" NAME="Radio1" VALUE="1" onClick="onClickFunction(1)" >Insert Record
    <BR>
    <INPUT TYPE="RADIO" NAME="Radio1" VALUE="2" onClick="onClickFunction(2)" >Delete Record
    <BR>
    </P>
    </form>
    </body>
    <Script Language="JavaScript">
    function onClickFunction(inVar) {
       if (inVar == 1) { document.myForm.action="servlet/InsertRecords";
                         document.myForm.submit(); }
       if (inVar == 2) { document.myForm.action="servlet/DeleteRecords";
                         document.myForm.submit(); }
    </script>
    </html>

  • Change submit destination based on form selection

    Is it possible to change the recipient of a form based on the info that was filled? for example
    checkbox A is selected -> form emailed to recipient A
    checkbox B is selected -> form emailed to recipient B
    checkbox A and B is selected -> form emailed to recipient A and B

    Thanks for your answers.
    I have already checked those links.
    Now th problem what I am facing is,
    I am not able to call the function ChangeLanguage through javascript.
    I have created a dropdwon using Hovermenu and added English and German.
    Now when I click on these the function should be called.
    Please help me in getting how setClientSideScript() can be used to call a function.
    or any other way to call the function after clicking on Hovermenu Item.
    Thanks in advance,
    Sumangala

  • Multiple submit buttons in a jsp form?

    I've been doing some research and found out that multiple buttons in a JSP form are possible by two ways:
    - We can obtain the value of the submit button to know which one was clicked in the parameters of the request using the name of the buttons (which should be the same for all the submit buttons).
    - We can change the submit destination using Javascript (Horrible solution since I want my web site to be safe to be used even if Javascript isn't active in clients browsers. I will use it of course since we can do amazing things with it but I want my website to be able to work without it also)
    WHAT annoys me is the fact that the value of a submit button is also his text, so if I change the text of the submit button, I will always have to check the servlet to do the corresponding change.
    Is there a third choice to be able to use multiple buttons?
    Olivier Voutat

    It seem rather convoluted at first but it's really good. I've not worked with JSF so I've no idea how that compares but from what I know, Craig McClanahan, who came up with Struts, worked on JSF also, so I guess it could only improve on Struts.
    EDIT: Here's a search result on Google'ing his name: http://www.theserverside.com/news/thread.tss?thread_id=29068
    But like I said, you don't have to use Struts ( which only uses standard JSP/ Servlets stuff anyway ), you simply use one of the ideas from it.
    For example; you have a properties file, say "/WEB-INF/properties/myProps.properties" with these entries:
    #USERS MODULE
    users.button.save=Save User
    users.button.search=Search User By Name
    users.button.delete=Delete UserThis would be a key: users.button.save to the value Save User
    Now, in your JSP, you use JSTL <fmt> tags:
    <fmt:setBundle basename="properties.myProps"/>
    //set the resource bundle you want to use
    //and create buttons with the proper values
    <input name="myButton" type="submit"><fmt:message key="users.button.save"/></input>
    <input name="myButton" type="submit"><fmt:message key="users.button.search"/></input>This would create buttons with text "Save User" and "Search User By Name" respectively
    Now, finally, in your servlet:
    //create a map of the properties,
    //possibly on app startup using a ServletContextListener
    //and put it in the servlet context for access everywhere
    HashMap myProps = (HashMap)getServletContext.getAttribute("myPropertiesMap");
    String buttonClicked = request.getParameter("myButton");
    if ( buttonClicked.equals((String)myProps.get("users.button.save")) )
    //perform save action
    else if ( buttonClicked.equals((String)myProps.get("users.button.search")) )
    //perform search action
    //etcYou'll obviously want to optimize this. Perhaps make a method that handles the comparison so you can have neater if conditions. But you get the idea, right?
    Edited by: nogoodatcoding on Oct 4, 2007 8:12 PM

  • Can LiveCycle do this?

    Please forgive a newbie question. I own Acrobat v7 with LiveCycle but before I invest a lot of time learning how to create forms, I wonder if what I want to do is even feasible with LiveCycle.
    I want to design forms and distribute them to users. Those users then want to assign their own email address to the Submit button and redistribute the forms to friends and relatives. When the friend/relative completes the form and clicks on Submit, we want the form to be emailed to the user (not to me).
    Can my customer somehow take the form I designed and change the email address that is assigned to the Submit button? Is there (or can there be) a data file that is bundled with the form ... and, if so, can the user customize that data file to change the Submit destination?
    If each of my user needs a copy of LiveCycle or if this scenario would somehow violate my LiveCycle license, then I'll have to find another form software solution.
    Any suggestions welcome.
    Thanks.
    -Bob

    >>>>Please forgive a newbie question. I own Acrobat v7 with LiveCycle but before I invest a lot of time learning how to create forms, I wonder if what I want to do is even feasible with LiveCycle.
    I assume you meant "Designer" when you said "LiveCycle".
    >>>>I want to design forms and distribute them to users. Those users then want to assign their own email address to the Submit button and redistribute the forms to friends and relatives. When the friend/relative completes the form and clicks on Submit, we want the form to be emailed to the user (not to me).
    This should be doable providing that you users have Acrobat Prof since that need to save the form after they enter their own email.
    >>>>Can my customer somehow take the form I designed and change the email address that is assigned to the Submit button? Is there (or can there be) a data file that is bundled with the form ... and, if so, can the user customize that data file to change the Submit destination?
    Yes, as long as the users have Acrobat Prof or Standard.

  • Creating an interactive survey

    Does anyone have code in creating an interactive survey? I'm fairly new to creating applets and interactive programs.
    a. I would like to send a survey to my respondents.
    b. I would like to receive formatted answers with them hitting a submit button after they complete the survey.
    Thanks

    The simplest thing to do is write a HTML form with all the questions in it. Then make the submit destination mailto:yourmail@wherever.
    No java required.

  • How do I change the destination of a the submit button on a form in Form Central?

    How do I change the destination of a the submit button on a form in Form Central?

    Sure. Because it is a scheduling form and I want the filled out form to be forwarded to our scheduling department email.
    Sincerely,
    John Biester
    Operations Manager

  • What is the purpose of Destination Function on Submit Button?(Doesn't work)

    Hi Gurus,
    There is a property "Destination Function" on Submit buttons.
    What is the purpose of this field.
    I tried setting some values here expecting following behavior in order:
    1. Process Form Request will get executed.
    2. User will be navigated to the OAF page related to the Destination Function.
    Destination Function property probably point to setInvokeFunction method of the OASubmitButtonBean.
    Please advise on this.
    Thanks and Regards,
    Prince

    Question 2. What is the purpose of View Instance on Submit Button? Is it there for BoundValues? Any examples how can we use this?
    Question 3. Related to Question 2, What is the purpose of View Instance and View Attribute on Button?

  • Can only submit task to Custom destination. Caused by moved Users folder?

    I recently installed my Final Cut Studio 2 on a new Mac Pro. We've installed the system with multiple users.
    Everything works fine except Compressor. We were not able to submit any rendering tasks. After checking the batch monitor I noticed some errors being thrown. It looked like a permissions problem.
    After creating a Custom Destination that points explicitly to some folder in the user's home folder, and using that as the default target destination, compressor submits without problems.
    Is it possible that the problem is caused by moving the Users home folder to another disk? The system disk is 128Gb SSD. I didn't want my data files to be on that system disk, so I moved them to a RAID.
    Any idea on how I can solve this?

    If the RAID is connected directly to your workstation, you should be able to Ignore Ownership on that volume. (Look in the info window in the Finder)
    It is recommended to use an external drive/RAID for scratch disks and exporting destinations.

  • How to open a new window from submit button &dialog page in current window?

    We have a requirement, wherein we have a OAF search page for PO lines with search criteria, Go button to search ,result region (table layout) and a submit button(Create new expedite).
    1. Now user can select some lines from result region and click on Submit button.
    2. On click of submit button we need to pop up a window or may be a dialog page asking that " Do you want open supplier web link portal or not?".
    3. If user clicks yes(in Dialog page) then first fetch the URL from a look up maintained in Oracle EBS on the basis of supplier of the lines selected and then open that URL in a new window and side by side we need to open a dialog page in search page asking "whether user has updated the expedite info in supplier portal or not?". On basis of this we need to updated some count in custom tables.
    So in step 3 i am facing problem, that how to open an URL in a new window through a submit button and side by side want to open a dialog page in the current window also.
    Hope a quick response from you all.
    Note:- To open a custom page we can have a link or button(button of type button and not submit button) on base page with destination url property as following javascript:
    javascript:var a = window.open('OA.jsp?page=/XXX/oracle/apps/xxx/......&retainAM=Y', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();
    So the question is how to do the same for submit button on OAF page???

    Antriksh,
    You just need to attach a submit action in button bean and not submit button bean, based on the output of confirm type of alert in javascript.
    Here is code u need to put in destination url of the button:
    //replace <confirm message> by message you want to show.
    javascript:input=confirm('<confirm message>');if(input==true){submitForm('DefaultFormName',0,{XXX:' abc'});}" Now in the process request of the base page CO, u can get parametre 'XXX' from the pagecontext....so
    if((("abc").equals(pageContext.getParameter("XXX"))))
    {/// custom LOGIC }
    The same i have replied in your mail. I hope this resolves the issue.
    --Mukul

  • How to open a new OAF page in new window while clicking submit button

    Dear All
    I am facing one problem.I have to pass some parameter in new page only after validation.I can't do validation in processRequest bacause I perform validation after clicking the submit button.
    So I have to write redirect code in processForm Request. I can not use simple "Button" bean since I have to set destination uri which could be set only in processRequest.But I can not pass parameter with it in process request.
    Thats why I have decided to use submit button but there is not target frame option in property inspector,So I am not able to open it in new window.
    Kindly give me some suggestion .
    Thanks in Advance

    hi,
    u can use submit button. U need to handle submit button press in processFormRequest method.
    if(pageContext.getParameter("Submit"!=null))
    // validate your parameter
    if parameter u capturing are valid then...
    pageContext.setForwardURL(func, params ...............) // check devguide for details
    if u want to access these parameter in second page . you can write this logic to processRequest of target page.
    U can refer toolbox tutorial drilldown and createpage examples for implementation details.
    Regards,
    Ram

  • How to get spool number when using SUBMIT job

    Hi All,
    I am calling standard program using SUBMIT through JOB as below. Now I need spool number for this job to covert the output to PDF and send to mail. See the below code and guide me.
    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.
      data: Zscreen type table of RSPARAMS with header line.
       Zscreen-selname = 'PM_AENNR'.
       Zscreen-kind = 'P'.
       ZSCREEN-LOW = '500000000125'.
       APPEND ZSCREEN.
    SUBMIT RCC00130 WITH selection-table Zscreen 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

    Hi,
    Do this way, first get print parameters by using function module 'GET_PRINT_PARAMETERS'
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination    = 'LP01'
          list_name      = 'TEST'
          list_text      = 'SUBMIT ... TO SAP-SPOOL'
          immediately    = ' '
          line_size      = '1023'
          no_dialog      = 'X'
        IMPORTING
          out_parameters = wa_pri_params
          valid          = w_valid.
    If it returns success then
        IF w_valid EQ 'X'.
          CONCATENATE 'R'                                   
                       w_tabix                                
                       sy-datum+4(4)
                       sy-uzeit INTO
                       wa_pri_params-plist.
        ENDIF.
        SUBMIT rprccc00
               WITH firmennr = w_cid
               WITH bel_clus = 'X'
               WITH testlauf = ' '
               WITH not_lokl = 'X'
               WITH file_in  = w_arc_out
               TO SAP-SPOOL WITHOUT SPOOL DYNPRO
               SPOOL PARAMETERS wa_pri_params AND RETURN.
        COMMIT WORK AND WAIT.
    SELECT rqident
             FROM tsp01
             INTO w_rqident
             UP TO 1 ROWS
             WHERE rq2name = wa_pri_params-plist.
      ENDSELECT.
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid     = w_rqident
          no_dialog       = 'X'
          dst_device      = 'LP01'
          pdf_destination = 'X'
        TABLES
          pdf             = t_pdf.
    Hope it solves your problem
    Regards
    Krishna

  • Submit via Job- problem in code

    I need to convert the PR to PO automatically, we can do this by me59n, so iam scheduling the job for the me59n program. here iam using Badi's, iam getting the PR, plant, vendor from IM_Eban from the method of Badi, reading this in internal table, zeban. now when the execute the transaction(va01) and saving, PR shouls be converted to PO. i would like to have guys look into the code, and pl correct this.
    method IF_EX_ME_REQ_POSTED~POSTED .
      DATA: ACTUAL_JOBNAME type tbtcjob-JOBNAME value 'Z_TEST2',
            JOBCOUNT type tbtcjob-JOBCOUNT,
            MSG(60) TYPE C,
            STIME TYPE SY-UZEIT.
      DATA: ZEBAN TYPE UEBAN.
      DATA: P_BANFN(10) TYPE N.
      read table IM_EBAN into Zeban index 1.
    *Open the Job
      CALL FUNCTION 'JOB_OPEN'             " OPENING JOB
             EXPORTING
                  JOBNAME  = ACTUAL_JOBNAME  " JOB NAME
             IMPORTING
                  JOBCOUNT = JOBCOUNT.
      DATA SELTAB type table of RSPARAMS.
      data : sel_wa type rsparams.
    Populate internal table.
      MOVE: 'S_EKGRP'       TO SEL_wa-SELNAME,
            'I'             TO SEL_WA-SIGN,
            'EQ'            TO SEL_WA-OPTION,
            'S'                 TO SEL_wa-KIND,
             Zeban-ekgrp         TO sel_wa-LOW.
      APPEND sel_wa to  SELTAB.
      CLEAR SEL_WA.
      MOVE: 'S_FLIEF'       TO SEL_wa-SELNAME,
            'I'             TO SEL_WA-SIGN,
            'EQ'            TO SEL_WA-OPTION,
            'S'                 TO SEL_wa-KIND,
             Zeban-flief         TO sel_wa-LOW.
      APPEND sel_wa to  SELTAB.
      CLEAR SEL_WA.
      MOVE: 'S_WERKS'       TO SEL_wa-SELNAME,
      'I'             TO SEL_WA-SIGN,
            'EQ'            TO SEL_WA-OPTION,
            'S'                 TO SEL_wa-KIND,
             Zeban-werks         TO sel_wa-LOW.
      APPEND sel_wa to  SELTAB.
      CLEAR SEL_WA.
      MOVE: 'P_GBANFN'          TO SEL_WA-SELNAME,
            'P'                 TO SEL_WA-KIND,
            'X'                 TO SEL_WA-LOW.
      APPEND SEL_WA TO SELTAB.
      CLEAR SEL_WA.
      MOVE: ZEBAN-BANFN TO P_BANFN.
      MOVE: 'S_BANFN'       TO SEL_WA-SELNAME,
            'I'             TO SEL_WA-SIGN,
            'EQ'            TO SEL_WA-OPTION,
            'S'             TO SEL_WA-KIND,
            P_BanfN          TO SEL_WA-LOW,
            SPACE            TO SEL_WA-HIGH.
      APPEND SEL_WA TO SELTAB.
    CLEAR SEL_WA.
    MOVE: 'P_VRTYPK'         TO SEL_WA-SELNAME,
           'P'                TO SEL_WA-KIND,
           'X'                TO SEL_WA-LOW.
    APPEND SEL_WA TO SELTAB.
      SUBMIT RM06BB30 VIA JOB ACTUAL_JOBNAME
                                        NUMBER JOBCOUNT
                                     TO SAP-SPOOL DESTINATION 'NULL'
                                     WITHOUT SPOOL DYNPRO
                                        WITH  SELECTION-TABLE SELTAB
                                        AND RETURN.
    STIME = SY-UZEIT + 900.
    *Schedule the job after 15 min and Close the job.
      CALL FUNCTION 'JOB_CLOSE'            " CLOSING JOB
             EXPORTING
                  JOBNAME      = ACTUAL_JOBNAME
                  JOBCOUNT     = JOBCOUNT
                  STRTIMMED    = 'X'
                  TARGETSYSTEM = SY-HOST.
                 LASTSTRTTM   = STIME.
    endmethod.

    Hi,
    Could you please let us know, what is the error you are getting.
    Best regards,
    Prashant

  • Problem in creating job via submit

    sap 4.7
    i am opening/scheduling job from other program/job
    And from some reason i get two jobs with the same name.
    One is working good, and the other one is stay in schedule.
    My problem is  , why i active two jobs and not only one  ?
    And why one (that I donu2019t want and need it at all ) is stay as "schedule" ?
    this is my code
      CONCATENATE  EVT_ID JOBCOUNT  INTO JOBNAME
                                               SEPARATED BY SPACE.
      LCL_TIME = SY-UZEIT + 1000 .  " + 15 minute
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          JOBNAME   = JOBNAME
        IMPORTING
          JOBCOUNT  = JOBCOUNT.  " AND RETURN
         CALL FUNCTION 'JOB_OPEN'
           EXPORTING
              JOBNAME          = JOBNAME
             DELANFREP        = SPACE
           IMPORTING
              JOBCOUNT         = JOBCOUNT
           EXCEPTIONS
              CANT_CREATE_JOB  = 1
              INVALID_JOB_DATA = 2
              JOBNAME_MISSING  = 3
              OTHERS           = 4.
       if sy-subrc <> 0 .
         MESSAGE  I099  WITH 'cant craete job' .
       endif.
            SUBMIT YITF_MOVE_TO_BCKP
             VIA JOB JOBNAME NUMBER JOBCOUNT
                TO SAP-SPOOL   IMMEDIATELY ' '
                DESTINATION    'LOCL'
                KEEP IN SPOOL  'X'
                WITHOUT SPOOL  DYNPRO
                WITH EVT_PARM =  EVT_PARM
                AND RETURN.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          JOBCOUNT  = JOBCOUNT
          JOBNAME   = JOBNAME
          SDLSTRTDT              = SY-DATUM     "i_strtdt
          SDLSTRTTM              =  LCL_TIME
         STRTIMMED = 'X'
    this is the status in sm37
    YITF_MFHBHY_LOAD 03304501           LEGACY          Scheduled
    YITF_MFHBHY_LOAD 03304501           LEGACY          Complete        04.03.2009 03:49:05

    Hi use this Code to fix the issue...
    DATA : v_jobhead LIKE tbtcjob.
    DATA : v_jobcount LIKE tbtcjob-jobcount.
    DATA : v_eventparm LIKE tbtcjob-eventparm.
    DATA : v_flg_released TYPE c.
    DATA: e_error.
    DATA: running LIKE tbtcv-run.
    TYPES: esp1_boolean LIKE boole-boole.
    CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
               esp1_true  TYPE esp1_boolean VALUE 'X'.
    CONSTANTS: true  TYPE boolean VALUE esp1_true,
                              false TYPE boolean VALUE esp1_false.
    PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
                v_report LIKE sy-repid,
                v_varian LIKE  raldb-variant,
                v_uname  LIKE sy-uname.
    START-OF-SELECTION.
    * add the new job
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
    *            delanfrep        = 'X'
                jobname          = v_jobnam
           IMPORTING
                jobcount         = v_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc  0.
        e_error = true.
      ELSE.
        CALL FUNCTION 'JOB_SUBMIT'  " or you can use SUBMIT statement as well.
             EXPORTING
                  authcknam               = v_uname
                  jobcount                = v_jobcount
                  jobname                 = v_jobnam
                  report                  = v_report
                  variant                 = v_varian
             EXCEPTIONS
                  bad_priparams           = 1
                  bad_xpgflags            = 2
                  invalid_jobdata         = 3
                  jobname_missing         = 4
                  job_notex               = 5
                  job_submit_failed       = 6
                  lock_failed             = 7
                  program_missing         = 8
                  prog_abap_and_extpg_set = 9
                  OTHERS                  = 10.
        IF sy-subrc  0.
          e_error = true.
        ELSE.
          CALL FUNCTION 'JOB_CLOSE'
               EXPORTING
    *               EVENT_ID                    = IC_WWI_WORKPROCESS_EVENT
    *               EVENT_PARAM                 = V_EVENTPARM
    *               EVENT_PERIODIC              = 'X'
                    jobcount                    = v_jobcount
                    jobname                     = v_jobnam
                    strtimmed                   = 'X'
               IMPORTING
                    job_was_released            = v_flg_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 sy-subrc  0.
            e_error = true.
          ELSE.
            DO.
              CALL FUNCTION 'SHOW_JOBSTATE'
                EXPORTING
                  jobcount               = v_jobcount
                  jobname                = v_jobnam
    *            IMPORTING
    *         ABORTED                =
    *         FINISHED               =
    *         PRELIMINARY            =
    *         READY                  =
    *              running                =
    *         SCHEDULED              =
               EXCEPTIONS
                 jobcount_missing       = 1
                 jobname_missing        = 2
                 job_notex              = 3
                 OTHERS                 = 4.
              IF sy-subrc  0.
                e_error = true.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              IF running = space.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
        ENDIF.
      ENDIF.

  • Submit rfbibl01 fails in background as 'LIST_FROM_MEMORY'  raising exceptio

    Hi All,
    I have a requirement where I submit "rfbibl01" in a custom program. The program works fine in foreground. Below is the code I am using for foreground run. The list output of rfbibl01 is being written to memory using the below submit statement and then read using FM 'LIST_FROM_MEMORY' into an internal table. This internal table is being used for further processing.
        SUBMIT rfbibl01 WITH  ds_name   =   v_filetemp
                        WITH  fl_check  =   v_fl_check
                        WITH  os_xon    =   ''
                        WITH  xnonunic  =   ''
                        WITH  callmode  =   'C'                   
                        WITH  max_comm  =   '1000'
                        WITH  pa_xprot  =   ''
                        WITH  anz_mode  =   'N'
                        WITH  update    =   'S'
                        WITH  xpop      =   ''
                        WITH  xlog      =   'X'
                        WITH  xinf      =   ''
                        EXPORTING LIST TO MEMORY AND RETURN.
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = i_memory_list[]
          EXCEPTIONS
            not_found  = 1
            OTHERS     = 2.
        IF sy-subrc <> 0.
          Error  'List not Found' .
        ENDIF.
    The same code gives exception for FM 'LIST_FROM_MEMORY', when run in background. The submit statement is successfull, but the FM raises error message and so the background processing is stopped.
    I have tried changing my code for background mode as below.
        CONSTANTS: c_job    TYPE tbtcjob-jobname VALUE 'ZFXL_56632_GL_ALINEA_SUB',
                   c_kind      TYPE c VALUE 'P',
                   c_sign      TYPE c VALUE 'I',
                   c_dest(8)   TYPE c VALUE 'HPMISPRT',
                   c_true      TYPE c VALUE 'X',
                   c_option(2) TYPE c VALUE 'EQ'.
        DATA: v_jobcnt     TYPE tbtcjob-jobcount,
              v_desc(200)  TYPE c,
              l_release(1) TYPE c.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = c_job
          IMPORTING
            jobcount         = v_jobcnt
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        DATA: print_parameters TYPE pri_params,
              archi_parameters TYPE arc_params,
              valid_flag(1) TYPE c,
              v_spono TYPE sy-spono.
        TYPES: BEGIN OF t_tsp01,
                 rqident   TYPE tsp01-rqident,
                 rqcretime TYPE tsp01-rqcretime,
               END OF t_tsp01.
        DATA i_tsp01 TYPE STANDARD TABLE OF t_tsp01.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          EXPORTING
            layout                 = 'X_65_132'
            line_count             = 65
            line_size              = 132
          IMPORTING
            out_parameters         = print_parameters
            out_archive_parameters = archi_parameters
            valid                  = valid_flag
          EXCEPTIONS
            invalid_print_params   = 2
            OTHERS                 = 4.
        IF valid_flag <> space AND sy-subrc = 0.
        Submit program in background to transfer log
          SUBMIT rfbibl01 WITH  ds_name   =   v_filetemp
                            WITH  fl_check  =   'X'                  " v_fl_check
                            WITH  os_xon    =   ''
                            WITH  xnonunic  =   ''
                            WITH  callmode  =   'C'
                            WITH  max_comm  =   '1000'
                            WITH  pa_xprot  =   ''
                            WITH  anz_mode  =   'N'
                            WITH  update    =   'S'
                            WITH  xpop      =   ''
                            WITH  xlog      =   'X'
                            WITH  xinf      =   ''
                         EXPORTING LIST TO MEMORY AND RETURN
                            VIA JOB c_job
                            NUMBER v_jobcnt
                            TO SAP-SPOOL
                            SPOOL   PARAMETERS print_parameters
                            ARCHIVE PARAMETERS archi_parameters
                            WITHOUT SPOOL DYNPRO
                            WITH destination = c_dest
                            WITH immediately = 'X' "space
                            WITH keep_in_spool = c_true
                            AND RETURN.
          COMMIT WORK.
          SELECT rqident RQCRETIME
          FROM tsp01
          INTO table i_tsp01
          WHERE rqowner EQ sy-uname.
            v_spono = sy-spono.
          ENDIF.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount                          = v_jobcnt
              jobname                           = c_job
    IMPORTING
      JOB_WAS_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
             invalid_target                    = 8
             OTHERS                            = 9.
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    But I do not see any spool number generated. My requirement is to use this spool number, job name and job number to get the list that is written to the spool and then do some processing on it.
    Can anyone suggest me how to solve this issue?
    <b><REMOVED BY MODERATOR></b>
    Thanks,
    Deepthi
    Message was edited by:
            Alvaro Tejada Galindo

    Hello Deepthi,
    Check whether the report is displaying ALV grid when it  is executed in bacground.
    Since when the report displays ALV grid then u can't export the list to memory from ALV grid.
    Regards,
    Vasanth

Maybe you are looking for