Change username using SUBMIT program USER via jobname command

Hi experts,
I have this scenario wherein the user is doing PGI cancellation in VL09, within the userexit I'm using CALL FUNCTION 'FB08' to reverse the FI document of the particular delivery order in process.
However, some users wont have any authorization for FB08.
Let's say user 'ABC' is doing the VL09, would this command: SUBMIT program USER 'BIZTALK' via jobname etc... actually change the username from user ABC(without authorization) to user BIZTALK(with authorization) so that no authorization failure would happen?
Thanks in advance!

Hi,
You can try with similar piece of code as mentioned below to call VL09 report:
DATA: number           TYPE tbtcjob-jobcount,
      name             TYPE tbtcjob-jobname VALUE 'JOB_TEST',
      print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
  EXPORTING
    jobname          = name
  IMPORTING
    jobcount         = number
  EXCEPTIONS
    cant_create_job  = 1
    invalid_job_data = 2
    jobname_missing  = 3
    OTHERS           = 4.
IF sy-subrc = 0.
  SUBMIT submitable TO SAP-SPOOL
                    SPOOL PARAMETERS print_parameters
                    WITHOUT SPOOL DYNPRO
                    USER user
                    VIA JOB name NUMBER number
                    AND RETURN.
  IF sy-subrc = 0.
    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        jobcount             = number
        jobname              = name
        strtimmed            = 'X'
      EXCEPTIONS
        cant_start_immediate = 1
        invalid_startdate    = 2
        jobname_missing      = 3
        job_close_failed     = 4
        job_nosteps          = 5
        job_notex            = 6
        lock_failed          = 7
        OTHERS               = 8.
    IF sy-subrc <> 0.
    ENDIF.
  ENDIF.
ENDIF.
Thanks & Regards,
Harish

Similar Messages

  • How to use Submit program of RAIMCOPY for a specific TCode - IM34

    Hi Experts,
    I have to use submit program RAIMCOPY.  but the program intend used in differnt Tcodes (IM27,IM27_Close,IM27_REPEAT,IM34,IM44,IM54,IM64).
    I used the following code but it is some other selection instead of IM34.
    SUBMIT RAIMCOPY VIA SELECTION-SCREEN with PA_PRNAM = gv_improg
                                                 WITH PA_GJAHR = gv_appyear
                                                 with SO_VERSN-LOW = 'G00'
                                                 with P_XVOVR = 'X'
                                                 and RETURN.
    Please help me to write a submit program RAIMCOPY for only IM34.
    Regards,
    Thulasiram.

    Yes at start of report (events LOAD-OF-PROGRAM and INITIALIZATION) the variant / parameters are not yet transfered to program, they are only passed just before the AT SELECTION-SCREEN OUTPUT, so that could have been nice ... before OSS note  927693 - Report variants used incorrectly in program RAIMCOPY which triggers now an error if sy-tcode <> pa_tcode in interactive mode ...
    So either you look for an implicit enhancement option to force again pa_tcode to required value (e.g. stored in memory) and disable effect of the OSS note (*) /or/ you replace the SUBMIT statement with a CALL TRANSACTION with a small BDC data.
    Regards,
    Raymond
    (*) SAP did that for transaction  IMCAOV, 1023920 - IMCAOV: Unberechtigter Abbruch 00368

  • Using SUBMIT program command in Background

    Hi,
    I am submitting the program in Background using Submit<program> command.
    Job is getting released but not fininishing(not executing the program) in ECC6.0.
    Same program is working in fine in 4.5b.
    Please let me know if any one faces this situation. Its very urgent.
    Expecting the reply from you soon..
    Thanks
    Regards,
    Raj A

    Hi,
    perhaps you or your admin have configured to less batch-workprocess or they are all configured only for A-class jobs.
    Try to start the job as A-Class job. If the program is executed, then ask your administrator to configure more batch workprocess that are not reserved for A-class jobs.
    Regards,
    Stefan

  • Problems to change BOM using RCSBI020  program

    Hi all,
    I need to change some BOMs, in particular I have to put 0 in filed "Lead-time offset" for every Items. I created an LSMW to do this and it works fine, it creates a batch-input session but when i run the session it delete my items instead of change them. I saw that happen because in FCODN filed the program put 03 instead of 02... I was not able to fill the structure in order to fill FCODN with 02...
    May be someone already had my same problem?
    Thanks
    GN

    Hi,
    i found the solution on my own in firm this morning.
    For setting a new Format you first have to find all the supported formats with
    Format[] formats = camInfo.getFormats().
    camInfo is instance of CaptureDeviceInfo. After this i need a MediaLocator for my camera.
    MediaLocator ml = camInfo.getMediaLocator()
    With ml you have to create a DataSource with the Manager.
    DataSource source = Manager.createDataSource(ml);
    The next thing you need is a list of all FormatControls. I think you need this, because you need the correct FormatControl instance for the Format you want to set later.
    FormatControl[] formatControls = ((CaptureDevice)source).getFormatControls();
    Now you should have all you need to set a Format of your choice. Choose a Format out of formats[] you want to set. Save it in some variable. In this example i use the Variable myFormat. Now you have the Format you want to set. In the next step you have to find the compatible FormatControl for your wanted Format. To find it, you have to search the formatControls Array.
    Format finalFormat = null;
    for (int i = 0; i <formatControls.length; i++) {
    if (formatControls[i] == null)
    continue;
    if ((finalFormat = formatControls.setFormat(myFormat)) != null)
    break;
    If formatControls[i].setFormat(myFormat) doesn't return null, you found the campatible formatControl for your Format and set the Format.
    All you have to do now is to connect to the source, create a Player and do whatever you want to do with it.
    Player player = null;
    try {
    source.connect();
    player = Manager.createPlayer(formattedSource);
    } catch (Exception e) {
    e.printStackTrace();
    I hope this will help anyone. Owens code (http://forum.java.sun.com/thread.jspa?threadID=570463&tstart=50) is really great and helps a lot, thanks for this, but i didn't find out how to change the resolution for the camera. Maybe i was just too stupid to find it :-) With Owens code i could solve all the other problems i had.
    Have fun with this
    Markus

  • Call Transaction / Submit Program

    Hello All,
    I have two ABAP reports : Report A & Report B.
    Report A has selection screen similar to Report B, where report A needs to send data to selection screen of Report B.
    Report B should be processed displaying its list display & should return its control back to Report B.
    This can be easily achieved by using SUBMIT program(Report B) with values from Report A.
    But my report B is made to run only via a TCode(ZEXECUTE) & hence when i submit program it is not executed
    as sy-tcode value in such case comes as SE38 .
    Further , Call Transaction (ZEXECUTE) using bdc_tab helps in passing the TCode & respective selection screen values
    correctly to Report B , but i am not able to see the outputs of the same.
    Please Note : I am not authorized to do any changes in Report B , so whatever i can try is from Report A itself.
    Kindly Help,
    Sudeep

    HI Suhas ,
    Firstly thanks for replying.
    1) Do you mean there is a hardcoding in Report B to check the t-code?
        Yes.
    2) What is the display mode you're using when doing via CALL TRANSACTION?
        Currently i am passing it as "A" , but still not able to get any output.
    Report A provides report B all the required values along with 'BDC_OKCODE'   '=ONLI'
    for executing the same. The report gets processed , but i am not able to see any list display.
    Thanks,
    Sudeep

  • Issue in submit program

    Hi all,
    The following is the issue in submit program:
    I am calling two programs /PBS/RIQMEL20  ( /pbs/iw59 ) and  /PBS/RIAUFK20 ( /pbs/iw39 ) using submit programs in my z program.
    I have created a layout /ZDEL56  for both programs. If I run submit program for /PBS/RIAUFK20 ( /pbs/iw39 ) I am getting the o/p in desired format ( As specified in the layout ).
    How ever for program /PBS/RIQMEL20  ( /pbs/iw59 ) submit program is giving an error saying that layout is not found.
    There is no difference b/w these two programs except that submitting program name is different.
    The txn /pbs/iw59 when executed in background is giving the desired result. But when I try using submit program it is failing.
    Can you please tell what mite be the problem?
    Following is the sample piece of code.
    submit /PBS/RIQMEL20
    with pbs_apar EQ '1'
    WITH VARIANT EQ '/ZDEL56'
    Pointers will be highly appreciated.
    Thanks,
    Shiva.

    Hi,
    In this case you need to use another internal table which is of type S_VBELN . Ex : it_vbeln.
    In that you have to append the record
    wa_vbeln-sign = 'I'
    wa_vbeln-option = 'EQ'
    wa_vbeln-low = w_inv.
    append wa_vbeln to it_vbeln.
    now use this
    submit B VIA SELECTION-SCREEN
    with P_DAYS = '4'
    with P_KALSM = 'ZATCIN'
    with S_VBELN = it_vbeln.
    Now the new record will be appended with the values which are passing,. SO u wil have two rows in the S_VBELN.
    Regards,
    Venkatesh.

  • Submit program & return

    I m having 2 programs separately.
    in the first program i m calling the second program via submit .
    If i use submit program & return means the control comes back to first program form second one .
    But wat i need is i want to get values from the second program to first program through Internal table
    Is this possible..
    If yes maens can any one help me to solve this.
    Thanks in advance.
    Kalpanashri Rajendran

    Hi Kalpanashri,
    You can use EXPORT and IMPORT statement.
    Please check this sample code.
    Program A :
    SELECT-OPTIONS: S_BELNR FOR BKPF-BELNR.
    EXPORT S_BELNR TO MEMORY ID 'ZXC9'.
    Program B :
    DATA: BEGIN OF S_BELNR OCCURS 10.
    INCLUDE STRUCTURE STRUC1.
    DATA: LOW LIKE BKPF-BELNR,
    HIGH LIKE BKPF-BELNR.
    DATA: END OF S_BELNR.
    IMPORT S_BELNR FROM MEMORY ID 'ZXC9'.
    For EXPORT: http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/export01.htm
    For IMPORT: http://www.geocities.com/siliconvalley/campus/6345/import01.htm
    Hope this will help.
    Regards,
    Ferry Lianto

  • In RFC can we use SUBMIT satement?

    Dear all,
    Thank u vvery much for ur response,
    In RFC can we use SUBMIT statement?
    I had a doubt Please clarify me.
    Thanks and Regards,

    Hi Lakshman,
    I am facing similar situation like Ravi.
    I am using Submit program inside RFC function module in BW.
    And one point here, I am using EXPORT and IMPORT memory IDs in the same RFC to retrive data in BW.
    I am calling this from R3.
    In BW it is working fine, where as in R3 nothing is coming.
    Please help me.
    Thanks,
    Veerendra.

  • Submit program RHGRENZ0

    Hi All,
    I am getting a Run time error in case of data issue while using Submit Program RHGRENZ0(to delimit the objects )  in production server.
    I would like to use TRY/ENDTRY and use catch cx_root exception.
    Will that Catch the Data issue in future.
    I could not reproduce similar scenario in development.
    Can Anyone suggest me.
    Thank you
    Edited by: Kumar B on Oct 20, 2009 7:44 PM

    Hi ,
    I am still getting Run time error even if I use TRY/ENDTRY block.
    Now I could create the error scenario.
    Actually I use Submit Program RHGRENZ0 in my custom program to delimit the positions.
    Now i have a position say '10000000'
    10/09/2009     12/31/9999     A     008     Holder     P     00032411     ???
    10/07/2009     10/15/2009     A     008     Holder     P     00053245     TEST EMP
    It has 2 holders .But the Employee 32411 No more exist.
    In that case I get the Error message
    "10/21/2009 20:12:11 Personnel number 00032411 does not exist                                          5A           054          E"
    Thus the Job fails.
    I just want to continue the job with other records instead of job failing for sake of one record.
    Is there any chance that Submit Program errors can be diverted rather than giving the Error out.
    Note : Here I am giving you a scenario.In actual this  case might not occur,As we are checking of any A008 relation exists beyond delimtation date and eliminating such scenario.So My actual need is to avoid run time error in case of this kind of scenarios
    Edited by: Kumar B on Oct 21, 2009 2:30 PM

  • Submit program for function pool

    Dear Experts,
                       i am using submit program for a standard report
       submit SAPLRHPA_REPORTING
                   with APPSELECT_HISTO eq  'X'
                   and return.
    it's going to dump how to use function pool programs in submit statements.
    You attempted to start the ABAP/4 program "SAPLRHPA_REPORTING" with SUBMIT, but
    attributes specify this program as type "F" instead of "1". You can
    only start programs of type 1 with SUBMIT.
    Thanks and Regards,
    Thirukumaran. R

    Hi
    As per my knoweldge i think you cant submit the fuction pool using by submit.
    Alternate way is call the function module which is within the function pool .
    Or if you want to execute a particular routine within a function pool you can use as below
    PERFORM Routine_name(saplrhpa_reporting)
                                           USING parameters.
    Hope this answer helps you
    Cheers.
    J.

  • Submit program option

    Dear Experts,
                 In the below code i'm getting all the pernr values from pb4000 table based on the selection criteria and using submit program rpapl005 i'm passing values to the pernr manually but i need to pass the values from internal tables automatically how to solve my issue is there any other way to solve this problem.
    Thanks in Advance.
    Thanks and Regards,
    Thiru. R
    *& Report  ZREPORT_N
    REPORT  ZREPORT_N.
    *& Report  ZREPORT
    tables : pb4000.
    select-options s_date  for   pb4000-begda.
    data : begin of wa,
    pernr type pb4000-pernr,
                    begda type pb4000-begda,
                    apsta type pb4000-apsta,
                    end of wa,
    it like table of wa.
    select pernr
    from  pb4000 into table it where
    begda in s_date AND APSTA eq '7'.
    LOOP AT IT INTO WA.
    WRITE : / WA-PERNR.
    ENDLOOP.
    SUBMIT  RPAPL005
    WITH    PAPAPLNO-LOW EQ  40
    WITH    PAPAPLNO-LOW EQ  109
    WITH    PAPAPLNO-LOW EQ  408
    WITH    PAPAPLNO-LOW EQ  413
    WITH    PAPAPLNO-LOW EQ  1
    WITH    PAPAPSTA-LOW EQ  7
    AND        RETURN.
    instead of passing values  for PAPAPLNO-LOW  manully i want to pass the values from internal table it.
    Can any try to solve my issue.

    Hi,
    Use this:
    data: rsparams_tab type table of rsparams.
            rsparams_wa type rsparams.
    Loop at it.
      rsparams_wa-selname = 'PAPAPLNO'.
      rsparams_wa-kind = 'S'.
      rsparams_wa-sign = 'I'.
      rsparams_wa-option = 'EQ'.
      rsparams_wa-low = "I don't know which field from table IT you want to pass, so pick one you want
      append rsparams_wa to rsparams_tab.
    endloop.
    SUBMIT RPAPL005 WITH SELECTION-TABLE rsparams_tab AND RETURN.
    Hope it will help you
    Marcin

  • How can I change passwd using CLI

    How can I change userpassword using iPlanet Delegated Administrator v1.1 Command Line Utilities?
    (imadmin user modify ... -A userpassword:MyNewPasswd

    In SIMS 4.0
    1) You know uncrypted password / setup a new one:
    imadmin modify user ... -W user_passwd
    2) You know crypted string:
    imadmin modify user ... -A userpassword:{crypt}a1vDyDPBLgTU2
    For both, you need administrative privileges.
    R.

  • How To Skip Report of Submit Program

    Hello All,
    I am submitting a Report program from a Program and should return to the calling program after processing.
    I have used  SUBMIT program WITH Parameters
                                                    AND RETURN .
    with this syntax, report of the submit program is displayed first, followed by the report of main program. I do not want the list of submit program to be displayed. How can I skip the same? Please advice.
    Thanks in advance,
    Pallavi.

    Hi Pallavi,
    Use SUBMIT Program  EXPORTING LIST TO MEMORY
              AND  RETURN.
    To use this data of the submitted report follow below process.
    Than once you return to ur main program CALL FUNCTION 'LIST_FROM_MEMORY'
    than to conver this list to text format  CALL FUNCTION 'LIST_TO_ASCI'
    Finally dont forget to use CALL FUNCTION 'LIST_FREE_MEMORY'.
    Regards,
    Ganesh.
    Edited by: Ganesh Lathi on Oct 4, 2011 1:45 PM

  • Direct Print smartform to printer via  JOB_OPEN function and using SUBMIT

    Hello,
    I can not able to printout from forms . I can able to get spool number but it is not printing directly to printer (printer Output should come automatic). I am getting error message in SP02 as Status ->Waiting    when i check is showing as "Frontend unavailable".
    please find sample code below to test same:
    REPORT  ZTEST_1                                  .
    constants : wc_x type c value 'X'.
    DATA: wv_val(1) TYPE c,
          wv_pripar TYPE pri_params,
          wv_arcpar TYPE arc_params,
          wv_lay   TYPE pri_params-paart value 'DINA4',
          wv_lines TYPE pri_params-linct,
          wv_rows  TYPE pri_params-linsz.
    data: wv_jobname like tbtcjob-jobname.
    data: wv_jobcount like tbtcjob-jobcount,
          wv_host like msxxlist-host.
    data: begin of ws_starttime.
            include structure tbtcstrt.
    data: end of ws_starttime.
    data: wv_starttimeimmediate like btch0000-char1 value 'X',
          wv_flag(1),
          WV_DO_PRINT type i.
    concatenate sy-tcode+0(4) ' ' 'sample test - print'
    into wv_jobname.
    *Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = 'X'
                jobname          = wv_jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = wv_jobcount
      if sy-subrc eq 0.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
                in_archive_parameters  = wv_arcpar
                in_parameters          = wv_pripar
                LIST_NAME           = 'JOB NAME'
                LIST_TEXT             = 'test_text'
                RECEIVER             = sy-uname
                IMMEDIATELY           = wc_x
                RELEASE               = wc_x
                USER                 = sy-uname
                layout                 = wv_lay
                no_dialog              = wc_x
           IMPORTING
                out_archive_parameters = wv_arcpar
                out_parameters         = wv_pripar
                valid                  = wv_val
    break-point.
    wv_pripar-PRSAP = space.
    wv_pripar-PRIOT = 1.
    wv_pripar-prrec = sy-uname.
    if not wv_val is initial.
    *call external program and pass data
    submit SF_EXAMPLE_01
          USER sy-uname
         via job wv_jobname
         number wv_jobcount
      TO SAP-SPOOL
    SPOOL PARAMETERS wv_pripar
    ARCHIVE PARAMETERS wv_arcpar
    WITHOUT SPOOL DYNPRO
    AND RETURN.
    endif.
    *Close job
      ws_starttime-sdlstrtdt = sy-datum .
      ws_starttime-sdlstrttm = sy-UZEIT.
        ws_starttime-IMSTRTPOS = WC_X .
      call function 'JOB_CLOSE'
           exporting
                event_id             = ws_starttime-eventid
                event_param          = ws_starttime-eventparm
                EVENT_PERIODIC       = space
                jobcount             = wv_jobcount
                jobname              = wv_jobname
                laststrtdt           = ws_starttime-laststrtdt
                laststrttm           = ws_starttime-laststrttm
                prddays              = 0                       "set to 0 not repeat
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = ws_starttime-sdlstrtdt
                sdlstrttm            = ws_starttime-sdlstrttm
                strtimmed            = wv_starttimeimmediate
      endif.

    Hi,
    As far as printing to devices not all devices support Bluetooth. Many devices support Bonjour protocal, IPP. The main print port is 9100. Additionally you can see what IO protocols are supported on a product by looking at the EWS (Embedded WebServer) there should be a networking page with that information.  Port 9100 is your basic print port and different devices will support different formats (PDF, JPEG, PCL5, PCL6). If there is an API you can find (i am not familiar with J2ME availible calls, then you can use those and send the data to port 9100. Again that is the basic path most printers will accept. not all devices support bonjour not all device support bluetooth etc... Hope that helps and good luck.
    I am an HP Employee.

  • SUBMIT program VIA JOB and SET/GET parameter

    Hi All
    I need to pass the content of a variable from the program 'A' to program 'B'.
    Program A uses JOB_OPEN , SUBMIT program VIA JOB jobname NUMBER jobnumber AND return, JOB_CLOSE.
    I tried to use import/export memory but it didn't work. Then I am trying to use set/get parameters but it also did not work.
    Program A is going to run in any server and program B will run in the central instance (it is determined in the FM JOB_CLOSE, parameter target_server).
    Program does not have selection-screen.
    Is it possible use set/get parameter with submit via job?
    Could you please advise?
    Thanks in advance.
    João Gaia

    Here a simple code
    *Submit report as job(i.e. in background)
    data: jobname like tbtcjob-jobname value
                                 'TRANSFER DATA'.
    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 value 'X'.
    * 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.
    Then... for import/export of a variable, you can use Import Memory and Export Memory function.
    Like this:
    REPORT A:
      IF NOT it_dlist_out IS INITIAL.
        EXPORT it_dlist_out TO MEMORY ID 'TEST1234'.
      ELSE.
    * Clearing memory
        FREE MEMORY ID 'TEST1234'.
      ENDIF.
    REPORT B:
    IMPORT it_dlist_out TO lt_dlist_out FROM MEMORY ID 'TEST1234'.
    Edited by: spantaleoni on Jan 11, 2011 3:21 PM
    Edited by: spantaleoni on Jan 11, 2011 3:23 PM

Maybe you are looking for