Submit Code not working in Background processing

Hi All,
I have a requirement to create delieveries based on the Sales Order through transaction VL04 (RV50SBT1).  Essentially, the program takes selected sales orders, determines the shipping point and creates deliveries immediately.  I believe that the code below is correct as it works when my program is run in the foreground; however, when I run my program in background, SM37 gives an error "Fill in all required entry fields."  The only mandatory field in VL04 is the Shipping Point (VSTEL) which is being successfully populated. 
  SUBMIT rv50sbt1  AND RETURN
                  WITH vstel = ls_vbap-vstel
                  WITH s_ledat BETWEEN '20091231' AND '99991231'
                  WITH samml = 'X'
                  WITH anzei = ' '.
Similar code to this is working in other custom developments that I have done; however, those programs only submit to programs without mandatory fields.  Am I doing something wrong?  Is it not possible to use the Submit command if a field is mandatory in the program you are submitting to?  Any help you can give would be greatly appreciated.  Thanks.
John

Hi Guys,
Yes, I am certain VSTEL is populated.  I created a very simple program to ensure that the values would be there and it still didn't work in background.  In this case, I pass one sales order that I know has a shipping point (in my case the VSTEL is populated with US01) via a parameter.  In debugging, I found that the value is correctly passed. 
Here is the test program I created.
data: ls_vbap type vbap.
PARAMETERS: pa_vbeln TYPE vbeln.
  SELECT SINGLE * INTO ls_vbap FROM vbap
    WHERE vbeln = pa_vbeln.
  SUBMIT rv50sbt1  AND RETURN
                  WITH vstel = ls_vbap-vstel
                  WITH s_ledat BETWEEN '20091231' AND '99991231'
                  WITH samml = 'X'
                  WITH anzei = ' '.
John

Similar Messages

  • SUBMIT does not work in background...

    Hi guys,
    We have a copy program of a standard transaction and once we use this copy program in the main program via SUBMIT... it does not work in background...
    Why is this so,,, Please advice...
    THanks!

    Hi,
    When executing some program using the statement like SUBMIT prog_2 WITH parameters and RETURN.
    In foreground PROG_2 is executed, and once you click on the BACK button the code written after this SUBMIT statement will be executed.
    If you are executing the same in the BACKGROUND mode, no feasibility of clicking on BACK button, hence control will remain in the PROG_2 only after executing its logic.
    Please code accordingly.

  • Workflow not working in Background Processing

    Hi All,
    I am relatively new to Workflow.  Currently, I am creating Deliveries (preferably in background) once a Sales Order is created.  I am using an ABAP Class as the object method to submit the sales order number to the delivery processing method (which just submits basic information to standard SAP transaction VL04).  I found that if the execution of the delivery creation task is not in Background Processing (the user manually kicks off the Delivery creation in SBWP) the workflow works as expected and creates the deliveries.  However, if the Background Processing is checked, the workflow does not process and does not create a delivery.  Is there any specific reason as to why the workflow will not work in background?
    Any help you can give would be greatly appreciated.  Thanks.
    John

    Hi,
    John
    See to process a Back ground task, there should be a proper parameter flow.
    Please look at the import parameters in the method you are using to process the back ground task..
    If proper import parameters are passed then the task will work
    This should help..
    Thanks,
    Shanky

  • SUBMIT RVV50R10C not working in background as well as foregrnd tcode:vl10b

    Hi,
       I have to create a code which creates delivery of STO in background as baapi creating issue and BDC can not be used for this, i am using submit.
    Code is as follows :
    report ZKIRAN.
    TABLES : mara.
    TYPES : BEGIN OF STR,
             SIGN(1),
             OPT(2),
             LOW(18),
             HIGH(18),
            END OF STR.
    TYPES : BEGIN OF STR1,
             SIGN(1),
             OPT(2),
             LOW(10),
             HIGH(10),
            END OF STR1.
    TYPES : BEGIN OF STR2,
             SIGN(1),
             OPT(2),
             LOW TYPE D,
             HIGH TYPE D,
            END OF STR2.
    DATA : MATNR TYPE STANDARD TABLE OF STR  WITH HEADER LINE,
           DATE  TYPE STANDARD TABLE OF STR2 WITH HEADER LINE,
           STO   TYPE STANDARD TABLE OF STR1 WITH HEADER LINE.
    MATNR-SIGN = 'I'.
    MATNR-OPT  = 'EQ'.
    MATNR-LOW  = '000000000001004362'.
    APPEND MATNR.
    CLEAR  MATNR-LOW.
    STO-SIGN = 'I'.
    STO-OPT  = 'EQ'.
    STO-LOW  = '6200001140'.
    APPEND STO.
    DATE-SIGN = ''.
    DATE-OPT  = ''.
    DATE-LOW  = ''.
    DATE-HIGH = ''.
    APPEND DATE.
    SUBMIT RVV50R10C  VIA SELECTION-SCREEN WITH st_matnr IN MATNR
                                           WITH st_ebeln IN STO
                                           WITH ST_LEDAT IN DATE
                                           WITH P_PROF1  eq '5001'
                                           WITH P_LERUL  EQ ''
                                           EXPORTING LIST TO MEMORY
                                             AND RETURN.
    It is not working .. plz reply what else i need to add in this code.
    This code displays 1st screen of vl10b . it also populates valeus passed in respective fields..but does not process further.
    I am suppose to schedule this job in background.
    Waiting for ur reply...A wrong code is already in productiion and i have ket my fingures crossed.
    pls help.

    Hi this was the code i used and it worked fine.
      DATA: t_ledat TYPE RANGE OF vbep-mbdat,
            e_ledat LIKE LINE  OF t_ledat.
      DATA: t_vbak  TYPE RANGE OF vbak-vbeln,
            e_vbak  LIKE LINE  OF t_vbak.
      DATA: t_vstel TYPE RANGE OF vbap-vstel,
            e_vstel LIKE LINE  OF t_vstel.
      DATA: t_ekko  TYPE RANGE OF ekko-ebeln,
            e_ekko  LIKE LINE  OF t_ekko.
          MOVE c_include              TO e_ledat-sign.
          MOVE c_between              TO e_ledat-option.
          MOVE s_mbdat-low            TO e_ledat-low.
          MOVE s_mbdat-high           TO e_ledat-high.
          APPEND e_ledat              TO t_ledat.
          MOVE c_include              TO e_vbak-sign.
          MOVE c_equal                TO e_vbak-option.
          MOVE <fs_del_sales>-vbeln   TO e_vbak-low.
          APPEND e_vbak               TO t_vbak.
          MOVE c_include              TO e_vstel-sign.
          MOVE c_equal                TO e_vstel-option.
          MOVE <fs_del_sales>-vstel   TO e_vstel-low.
          APPEND e_vstel              TO t_vstel.
          CLEAR:  w_scenario,
                  w_profilname.
          MOVE : '0001'   TO w_scenario,
                      '5001'         TO w_profilname.
          CLEAR: e_t186v,
                       e_list_profil.
    *       Get List-Profil-data if given or from default values
          PERFORM f_profil_data_complete in program saplv50r_pre
            USING    w_scenario
                     w_profilname
            CHANGING e_t186v
                     e_list_profil.
          MOVE 1 TO e_list_profil-list_type .
          MOVE e_ledat-high TO e_list_profil-ledat_high.
          CALL FUNCTION 'SHP_LIST_PROFIL_SET'
            EXPORTING
              ix_list_profil = e_list_profil.
          CLEAR : w_souro.
          MOVE p_souro TO w_souro.
          SUBMIT rvv50r10c WITH p_prnam  EQ w_souro
                           WITH p_lerul  EQ space
                           WITH st_ledat IN t_ledat
                           WITH st_vbeln IN t_vbak
                           WITH st_vstel IN t_vstel
                           EXPORTING LIST TO MEMORY AND RETURN.
          IF sy-subrc EQ 0.
            COMMIT WORK AND WAIT.
          ENDIF.
    You can also check the code in  FM OIO_RS_M_DELIVERY_2 for any more clarifications

  • Submit and return exporting list to memory is not working in background

    Hi gurus,
    i am using submit statement and exporting list to memory. it works fine in foreground and i am able to get the output. but in case of background , it is not exporting the list.PLease help me on this.
    Thanks and regards,
    Rajeshwar

    Hello Rajeshwar,
    This is a duplicate thread. You have a thread with the same question.
    [list_to_memory is not working in background;
    Jayant Sahu

  • Program not working ib background

    Moderator message: background/foreground/GUI problems = FAQ, please search before posting.
    Hi All,
    I have a program which is not working in background.It actuly takes the file and using GUI_upload i upload it into ITAb and then modify the database table based on this. But when i process this in foreground it working and updating the table.But when i scedule in background the job is getting over in 1-2 sec and not updating the table.
    Please help me. below is the code for your refrence:
    data:begin of i_tab occurs 0,
          Bp1 like DATAbase table,
          Bp2 like  database table,
         trf1 type string,
         trf2 type string,
         status type string,
      end of i_tab.
    data: BP_ver type STANDARD TABLE OF DATAbase table      with header line ,
          w_ver type  ZVERS_BUT050_CUR .
    DATA: it_tab type filetable,
        gd_subrc TYPE i,
        file_name TYPE string,
        path TYPE string.
    DATA : lw_file TYPE file_table.
    DATA: LIN TYPE I.
    *Input File
    SELECTION-SCREEN begin of block blk with frame title text-100.
    SELECTION-SCREEN SKIP 2.
    parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CLEAR:  file_name.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select only Text File'
          default_filename = '*.txt'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      READ TABLE  it_tab INTO lw_file INDEX 1.
      file_name = lw_file.
      p_file = file_name.
    START-OF-SELECTION.
    *Upload the file
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILE_NAME
         FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
        TABLES
          DATA_TAB                    = i_tab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      loop at i_tab.
        if i_tab-status = 'Yes'.
          i_tab-status = 'V'.
        else.
          i_tab-status = 'I'.
        endif.
        modify i_tab.
      endloop.
      if i_tab is not INITIAL.
        select * from DATAbase table into CORRESPONDING FIELDS OF TABLE  BP_ver FOR ALL ENTRIES IN i_tab
          where PARTNER1 = i_tab-Bp1 and PARTNER2 = i_tab-bp2  .
      endif.
    *Update the table
      loop at BP_ver .
        clear i_tab.
        read TABLE i_tab  with key bp1 = BP_ver-PARTNER1 bp2 = BP_ver-PARTNER2  .
       if i_tab-bp1 = w_ver-PARTNER1 and i_tab-bp2 = w_ver-PARTNER2.
        BP_ver-PARTNER1 = i_tab-bp1 .
        BP_ver-PARTNER2 = i_tab-bp2 .
        BP_ver-Z_CURRENTLY_VALI = i_tab-status .
        modify BP_ver TRANSPORTING Z_CURRENTLY_VALI .
       endif.
      endloop.
      update DATAbase table from table bp_ver[] .
      if sy-SUBRC eq 0.
        commit work.
        message 'Table DATAbase table Updated Sucsussfully' type 'S'.
      else.
        message 'Table Not Updated !!! Check the file data or input' type 'S'.
      endif.
    Edited by: Thomas Zloch on Nov 12, 2010 11:03 AM

    Hi,
         Look at the coding in FM GUI_UPLOAD ... This does not work in background ....
    Batch mode is not supported
      IF sy-batch = 'X'.
        MESSAGE ID 'FES' TYPE 'E' NUMBER '002' RAISING NO_BATCH.
      ENDIF.
    Regards,
    Srini.

  • BADI implementation is not working in background for MRRL

    Hai frnds,
    BADI: MRM_WT_SPLIT_UPDATE is used for deducting withholding tax in MRRL(Invoice verification). This BADI was implemented and working fine in foreground, but not working in background.
    After implementing the BADI, the standard method of calculating TDS(from vendor master) is over written by BADI implementation.Now standard deduction is also not workijng in background.Plz help me to solve it.
    Bala.V

    HI,
    COR6N is the Enjoy Transaction and sap does not suggest to write the BDC on these transaction as most of these transaction uses the GUI elements foe better display and which cannot be recorded while processing the BDC in back ground.
    Check for the Normal transaction and write the BDC for it.
    Or
    Pass X to Rcommit flag in the CTU_PARAMS option and check.

  • BDC is not working in background for Transaction COR6N

    Hi ,
       We have written the BDC program for transaction COR6N. BDC works perfectly in foreground but it's not working for background option.
        SELECT SINGLE AUFPL INTO W_AUFPL FROM AFKO
                  WHERE AUFNR = W_AUFNR.
        SELECT AUFPL VORNR INTO TABLE IT_PHASE FROM AFVC
                WHERE AUFPL = W_AUFPL
                  AND PHFLG = 'X'.
        LOOP AT IT_PHASE.
        WA_BDCDATA-PROGRAM  = 'SAPLCORU_S'.
        WA_BDCDATA-DYNPRO   = '0100'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-AUFNR'.
        WA_BDCDATA-FVAL     = W_AUFNR.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-VORNR'.
        WA_BDCDATA-FVAL     = IT_PHASE-VORNR.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'BDC_OKCODE'.
        WA_BDCDATA-FVAL     = '/00'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-PROGRAM  = 'SAPLCORU_S'.
        WA_BDCDATA-DYNPRO   = '0100'.
        WA_BDCDATA-DYNBEGIN = 'X'.
        APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'AFRUD-LMNGA'.
        WA_BDCDATA-FVAL     = w_qty. "'60'.
        APPEND WA_BDCDATA TO BDCDATA.
       CLEAR WA_BDCDATA.
       WA_BDCDATA-FNAM     = 'AFRUD-BUDAT'.
       WA_BDCDATA-FVAL     = w_date. "'31.12.2008'.
       APPEND WA_BDCDATA TO BDCDATA.
        CLEAR WA_BDCDATA.
        WA_BDCDATA-FNAM     = 'BDC_OKCODE'.
        WA_BDCDATA-FVAL     = '=BU'.
        APPEND WA_BDCDATA TO BDCDATA.
        clear X_OPTIONS.
        X_OPTIONS-DISMODE = 'N'.  ' works perfectly for 'A'
        X_OPTIONS-UPDMODE = 'S'.
        X_OPTIONS-CATTMODE = ' '.
        X_OPTIONS-DEFSIZE = ' '.
        X_OPTIONS-RACOMMIT = ' '.
        X_OPTIONS-NOBINPT = 'X'.
        X_OPTIONS-NOBIEND = ' '.
        CALL TRANSACTION 'COR6N'  USING BDCDATA  OPTIONS FROM X_OPTIONS
                           MESSAGES INTO ITAB.
                     MODE 'N'  MESSAGES INTO ITAB UPDATE 'S'.
       WAIT UP TO 3 SECONDS.
        COMMIT WORK AND WAIT.
        CLEAR:BDCDATA[],WA_BDCDATA.

    HI,
    COR6N is the Enjoy Transaction and sap does not suggest to write the BDC on these transaction as most of these transaction uses the GUI elements foe better display and which cannot be recorded while processing the BDC in back ground.
    Check for the Normal transaction and write the BDC for it.
    Or
    Pass X to Rcommit flag in the CTU_PARAMS option and check.

  • Open dataset is not working in background in PRD

    Dear All,
    Open dataset is not working in background in PRD .
    OPEN DATASET filepath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    Whike running in foregroundits working dev as well as prd.
    but when i am running in background  its giving error like file not found .
    but al11 is working (i mean my file path is working ).
    Thanks N Regards,
    Srinivasa Reddy

    your authority team shall check the batch user of that abap!
    Could you please tell us the detailed error message?
    grx
    Andreas

  • In c200 chat is not working on background like 273...

    In 2730 c i will get sound alart when i get a im i will be 24hours online Chat is not working in background in c200 like 2730 c so i cant use im all time how to make it work like 2730 c in my c200 both are s40 no

    Dude, make sure u are on a 3G network to ensure clarity, then also, install skype so that you can get some of those neccessary files/apps to carry out voice stuffs...

  • Gui_download Function module is not working in Background Scheduling

    Hi Experts,
    Function modules like GUI_DOWNLOAD are not working in background scheduled jobs, It is raising an exception. Though it is working fine in foreground execution.
    Please provide me solution for this challenging task.
    you could be rated well for this question.
    Thanks,
    Rama Krishna.

    Hello,
    work with open dataset and close dataset...
    just loop over itab and transfer itab field for field into a string field separated by ;
    Here is an extract of coding:
    OPEN DATASET p_dath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT itab_pos.
        CLEAR satz.
        MOVE itab_pos-vbeln TO satz-vbeln.
        MOVE ';' TO satz-fill1.
        MOVE itab_pos-kunnr TO satz-kunnr.
        MOVE ';' TO satz-fill2.
        MOVE itab_pos-ktgrd TO satz-ktgrd.
        MOVE ';' TO satz-fill3.
        MOVE itab_pos-fkdat TO satz-fkdat.
        MOVE ';' TO satz-fill4.
        MOVE itab_pos-budat TO satz-budat.
        MOVE ';' TO satz-fill5.
        MOVE itab_pos-cpudt TO satz-cpudt.
        MOVE ';' TO satz-fill6.
        MOVE itab_pos-fkimg TO satz-fkimg.
        MOVE ';' TO satz-fill7.
        MOVE itab_pos-netwr TO satz-netwr.
        MOVE ';' TO satz-fill8.
        MOVE itab_pos-vrkme TO satz-vrkme.
        MOVE ';' TO satz-fill9.
        MOVE itab_pos-ktgrm TO satz-ktgrm.
        MOVE ';' TO satz-fill10.
        MOVE itab_pos-matnr TO satz-matnr.
        MOVE ';' TO satz-fill11.
        MOVE itab_pos-mattxt TO satz-mattxt.
        MOVE ';' TO satz-fill12.
        MOVE itab_pos-gewei TO satz-gewei.
        MOVE ';' TO satz-fill13.
        MOVE itab_pos-brgew TO satz-brgew.
        TRANSFER satz TO p_dath.
      ENDLOOP.
      CLOSE DATASET p_dath.
    It is not so comfortable as it is with GUI_DOWNLOAD but it works in background!

  • List_to_memory is not working in background

    Hi Gurus,
    i am trying to use function module list_to_memory in background.in foreground i am able to send list to memory,but when comes to background it is throwing an error message( i .e list has not been moved to
    memory) . please help me <<Text removed by moderator>>
    Thanks and regards
    rajeshwar
    Edited by: Matt on Dec 3, 2008 1:54 PM  Don't say "ASAP"

    Hi,
    List_to_memory inturn calls Save_list FM and if u see the documention of this FM it is not suitable for background processing.
    SAVE_LIST is noto suitable for saving lists produced during background processing.
    So do it by other ways.
    Rhea.

  • GUI_DOWNLOAD does not work for background printing

    Hi,
    Need some help urgently.
    Function moduel GUI_DOWNLOAD does not work for background printing. I want to know how this issue can be handled or we have to use some other function module.
    We are using this in a report and i get the error dump OBJECTS_OBJREF_NOT_ASSIGNED when we run this report in background.
    Kindly suggest.
    Best Regards,
    Abbasi

    you can not use gui_download in background.
    Try searching first, this thing has been posted a thousand times already

  • Connot submit batch - Unable to connect background process?

    Trying to export 60 min high quality mpeg and get the following message: "Connot submit batch - Unable to connect background process"
    I use FCP 4.5 HD

    You don't give many details but Jon Chappell of DigitalRebellion has produced a free utility to help with Compressor problems.
    He posted these details recently:-
    "It seems like a number of people on this forum are having problems submitting batches from Compressor, so I created a utility to diagnose and fix some of those problems.
    Compressor Repair will check all necessary files exist on your hard drive and that permissions are set correctly. It also resets Qmaster, trashes the Qmaster spool directory and launches qmasterd."
    http://www.digitalrebellion.com/downloads/CompressorRepair.zip

  • PS4 Game Voucher Code not working

    my PS4 Game Voucher Code not working and says: "The code you entered may not be correct or may no longer be valid" "Please check your entry (e-820000134)  

    Voucher codes are region-specific. For instance a US voucher won't work with a UK account. First thing to check is whether the voucher's region matches your account's region.

Maybe you are looking for

  • Problem when setting Reason of Rejection for a sales order using IDOC

    Hi All,       I am working on a requirement where i need to put a reason for rejection as 'Item Cancelled' for a sales order via IDOC 'IDOC_INPUT_ORDCHG' in a third party scenerio where the PR is created automatically from the sales order . When the

  • Export Financial reports from one env. to another

    Hi, I have a question regarding Hyperion FR export. Is it possible to export a set of reports at once from one env. to another. I'm able to export and import one report at a time..Just wondering, how's this going to work if we have huge number of rep

  • Image Download Issues

    Here is a link to a post I made a month back in the Tiger area of Discussions. Okay, now I have three people, one of our Sales people inside the office and two clients outside the office who every time they attempt to download an images off our websi

  • NPE in appc

    Hello. I'm getting a NPE via appc. It occurs when my application includes a weblogic-application.xml descriptor. It appears that despite the ejb element being optional, the EAR Validator assumes there is one and is try to process the entity cache ele

  • HT4972 My iPad is running OS 4.3.3(8J2). I want to upgrade to OS 5 or higher

    I can not find the upgrade link. Where can it be found?