How to use open job

I have this in my technical design interace:
We need to know which processing program we have to call:
  SELECT SINGLE PROCPROG
  INTO l_procprog
  FROM ZGL_MPF_CONFIG
  WHERE interfacename = INTERFACENAME.
Open a job with this processing program  ( the processing program should be a function module which creates an Idoc).use functions JOB_OPEN and JOB_CLOSE.
How i have to use this sentences?
Thx

1.u can use like this
2.
report abc.
BREAK-POINT.
DATA : JN(32) TYPE C.
JN = 'JOB001'.
BREAK-POINT.
DATA : J(8) TYPE C.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = JN
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
JOBCOUNT = J
CHANGING
RET =
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 : P TYPE PRI_PARAMS.
P-PDEST = 'PRINTER'.
P-PDEST = 'LOCL'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING NO_DIALOG = 'X'
MODE = 'CURRENT'
NEW_LIST_ID = $PRNEW
IMPORTING OUT_PARAMETERS = P.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = 'MAMIT'
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = J
jobname = JN
LANGUAGE = SY-LANGU
PRIPARAMS = P
REPORT = 'HINCF160'
VARIANT = 'A'
IMPORTING
STEP_NUMBER =
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = J
jobname = JN
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
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.
BREAK-POINT.
regards,
Ravi

Similar Messages

  • How to use open data set in SAP

    Hi SAP Gurus,
            Could anyone help, how to use open data set in SAP.
          I need to upload a file from Application server (ZSAPUSAGEDATA) to internal table (IT_FINAL).
    Thanks & Regards,
    Krishnau2026

    Hi Krishna.
    These are the steps you need to follow.
    tables: specify the table.
    data: begin of fs_...
            end of fs_    " Structure Field string.
    data: t_table like
            standard table
                      of fs_...
    data:
    w_file TYPE string.
    data:
      fname(10) VALUE '.\xyz.TXT'.
    select-options: if any.
    PARAMETERS:
      p_file LIKE rlgrap-filename.
    w_file = p_file.
    select .... statement
    OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    LOOP AT t_... INTO fs_....
    write:/ .....
    TRANSFER fs_... TO fname.
    or
    TRANSFER t_... TO fname
    ENDLOOP.
    CLOSE DATASET fname.
    Reward points wisely and if you are benefitted or ask for more detailed explanation if problem not solved.
    Regards Harsh.

  • Hi experts, how to use open sql to read data from one " maintenance view"?

    i want to use this part of data within report ,so how to use open sql statement to read data from one " maintenance view"?

    Hi
    You can't use OPEN SQl statements to fetch data from maintenance view
    You have to use only Database views
    see the different types of views and the difference
    The followings are different types of views:
    - Database View (SE11)
    Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
    In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
    - Help View ( SE54)
    Help views are used to output additional information when the online help system is called.
    When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
    - Projection View
    Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
    A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
    - Maintenance View ( SE54 )
    Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
    Please have a look at below link. It will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
    for more detailed info look on:
    http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
    Reward points for useful Answers
    Regards
    Anji

  • How to use "Open Stream" command?

    How to use "Open Stream" command in the iTunes application.

    File > Open Stream > Enter a URL > Click OK > Listen. Obviously the URL needs be a valid media source like an mp3 file or a streaming radio station.
    tt2

  • How to use open cursor and iner join in one statement

    Hello All,
    Could any one post the code for the below question?
    How to use open cursor and iner join in one statement
    Regards,
    Lisa

    OPEN CURSOR c FOR SELECT     carrid connid fldate bookid smoker
                        FROM     sbook innerjoin shook
                        ORDER BY carrid connid fldate smoker bookid.
    Pls reward if helpful.

  • How to use -open option at command prompt

    Can someone update me with how to use -open option while launching javaws from command prompt. Sun documnetation (http://java.sun.com/javase/6/docs/technotes/tools/share/javaws.html#runoptions) is not very clear.
    I am trying to do something like this
    javaws -open prop1 firstName prop2 lastName http://myapp.jnlp
    However the above does not work. It says incorrect argument firstName.
    Cheers
    Amit

    The syntax as present in JWS documentation
    javaws [run-options] <jnlp>
    [run-options] Command-line run-options. run-options may be in any order. For a discussion of the various run-options, see RUN-OPTIONS below.
    <jnlp> This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file.

  • How to use open Row set in sql server 2014

    Hello All,
    How to open the row set using sql server 2014 using link server connection.

    Hi  denyy,
    Are you referring to the OPENROWSET function in SQL Server 2014?
    The OPENROWSET method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data by using OLE DB. The examples below demonstrate how to use the OPENROWSET function:
    A. Using OPENROWSET with SELECT and the SQL Server Native Client OLE DB Provider
    SELECT a.*
    FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
    'SELECT GroupName, Name, DepartmentID
    FROM AdventureWorks2012.HumanResources.Department
    ORDER BY GroupName, Name') AS a;
    B. Using the Microsoft OLE DB Provider for Jet
    SELECT CustomerID, CompanyName
    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
    'C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb';
    'admin';'',Customers);
    GO
    C. Using OPENROWSET to bulk insert file data into a varbinary(max) column
    USE AdventureWorks2012;
    GO
    CREATE TABLE myTable(FileName nvarchar(60),
    FileType nvarchar(60), Document varbinary(max));
    GO
    INSERT INTO myTable(FileName, FileType, Document)
    SELECT 'Text1.txt' AS FileName,
    '.txt' AS FileType,
    * FROM OPENROWSET(BULK N'C:\Text1.txt', SINGLE_BLOB) AS Document;
    GO
    D. Using the OPENROWSET BULK provider with a format file to retrieve rows from a text file
    SELECT a.* FROM OPENROWSET( BULK 'c:\test\values.txt',
    FORMATFILE = 'c:\test\values.fmt') AS a;
    Reference:
    OPENROWSET (Transact-SQL)
    Using the OPENROWSET function in SQL Server
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.

  • How to use Open/Create/Replace File.vi

    How to change Open/Create/Replace File.vi to Open File?

    Use the routine Write Characters to File.vi found under the File IO palette. It has a boolean control on the front panel. If this is set true, data is appended to the end of an existing file, or a new one is created if the file doesn't exist. If the control is set to false, the file is always created new--overwriting any existing file with the same name.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to Use Open Dialog Box, & Save Dialog Box

    Hi Frens,
    Can You tell me how can i use open dialog box, and save
    dialog box using Flex. Because there is no such components are
    given here.
    Also How can i Do when I click on some button, or some event
    Please tell me abt this, Thks in advance frens
    Ashish Mishra

    for input requested try this
    String ar = JOptionPane.showInputDialog("Please, enter artist name");for any sort of message box try this
    int answer = JOptionPane.showConfirmDialog(null, "Enter another record?",
                                "???",JOptionPane.YES_NO_OPTION);This might help you buddy.

  • How to use open graph tags in muse to show facebook share images

    i am trying to use a facebook share button. i would like to have a preview of the image in the story i want to have shared.
    i know that it has to do with open graph tags. i am unsure of how and where to add these og tags to my muse program to have the preview of it show in the share window

    Hey tgtoast.
    I don't think this is possible in Muse, however, if you're at all comfortable editing your HTML file, then you can add the tags after they're uploaded to your host.
    Just log into your host and through file manager, find your index.html file. Open it for editing.
    Anywhere between the <head> and </head> tags, enter the following code:
    <meta property="og:image" content="http://www.yourdomain.com/imagename.jpg" />
    Then you should go to the Facebook Debugger https://developers.facebook.com/tools/debug and enter your website URL to make sure Facebook is showing the image you want.

  • How to use Start-Job?

    Hello folks,
    I am trying to setup a simple Start-Job command.  This basic command works for me and copies the file correctly.
    Start-Job -Scriptblock {Copy-Item -Path \\192.168.32.25\share\butterfly.jpg -Destination c:\test\ -Recurse -Verbose}
    However, it does not work when I try using variable like this.
    $source = "\\192.168.32.25\share\butterfly.jpg"
    $target = "c:\test\"
    Start-Job -Scriptblock {Copy-Item -Path $source -Destination $target -Recurse -Verbose}
    Anyone have suggestions for getting this to work with variables?
    Thanks,
    romatlo

    Hi,
    Here's some information:
    http://powershell.org/wp/forums/topic/passing-parameter-to-start-job/
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/ff644fca-1b25-4c8a-9a8a-ce90eb024389/in-powershell-how-do-i-pass-startjob-arguments-to-a-script-using-param-style-arguments?forum=ITCG
    Basically, look at using -ArgumentList:
    http://ss64.com/ps/start-job.html
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • How to use open query in oracle select statement

    hi i have a requirement like this. I need to use the output of a procedure ( pl/sql table ) in developing a report
    like  (  SELECT * FROM <procedure name >)
    please help me.

    You can do it by using classic report but I can't tell you without knowing complete detail. If possible can you post your procedure query which you want to use to create report.
    Thanks
    Lakshmi

  • How can i schedule jobs daily by using fm's

    hi all,
    am using open job ,submit job,close job fm's to schedule back ground jobs,
    want to schedule it daily which parameter i need to pass in close_job for daily job scheduling

    you can get the clear documentation by using ABAPDOCU transaction.
    Regards
    Mani.

  • Transfering the data using OPEN DATASET

    Hi all,
    I am trying to get the data using OPEN DATASET to down load the data and using TRANSFER i am transfering.
    i got strucked while i am downloading.
    Please send coding how to use open dataset and transfer.
    Thanks in advance
    Venkat

    Hi ,
    you can try this code frangment.
    open the file to be created on application server.
      OPEN DATASET app_path FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        MESSAGE e001(zs) .
      ELSE.
    get header data
         PERFORM get_data_header.
    *transfer data to application server file.
        TRANSFER v_header TO app_path.
    get segment data
        PERFORM get_data_segment.
    *transfer data to application server file.
        TRANSFER v_segment TO app_path.
    *clear work areas and local variables.
        PERFORM clear_local.
    get trailer record.
        PERFORM get_data_trailer.
    *transfer data to application server file.
        TRANSFER v_trailer TO app_path.
      ENDIF.
      CLOSE DATASET app_path.
    regards,
    Sumit.

  • How to use quartz jobscheduling framework

    how to use quartz job scheduling framework to send mails to a recipint when he places an order.
    give idea abt how it is going to detect the placing of order.is there any listener to detect that
    Edited by: sivaprasadrao on Jun 30, 2008 3:15 AM

    Hi,
    How does he places an order ?. It may be some block of your code. Include your mail function in that block.
    Regards,
    Ram.

Maybe you are looking for