Adding SAP CCMS startup command to SAP Start Profile

Hi All,
We need to add SAP CCMS startup command in our SAP start profile.
We use command sapccm4x -DCCMS pf=<> to start SAP CCMS agent .
I expect we need to add this command (sapccm4x -DCCMS pf=<> ) with same protocol to execute it with SAP start profile.
Please let me know how can we add this with SAP start profile.
Shivam Mittal

Hi Eric,
I have added command and CCMS agent is also getting start with SAP startup.
But when I execute command startsap ....like it shows message "database started";;"Instance Started", I am not getting any SAPCCMS agent startup message.
Please suggest how can I get in startsap script SAPCCMS startup confirmation messge also. Does it require change in startsap script or we should some command protocol in startup profie for it.
Please suggest.
Shivam Mittal

Similar Messages

  • How to configure SAP CCM to a non SAP system

    Hi all,
      What should be my landscape if we have to go for an external catalog linked to a non SAP system?
    Our requirement is like this :
    The customer has nonsap system and they want to go only for catalog content management only for vendors like DELL who maintain products of their own
    (external catalogs). i-e., they will create PO from the nonSAP system and will send it to vendor selecting the products from the DELL's website.
    How should we go with this? Will SAP CCM support this with XI.
    Kindly explain me the following :
    What should be my landscape and config?
    Can anyone explain please?
    Regards,
    Sridhar.

    Dear Sridhar,
    Firstly - If you customer has a non SAP system and want to use SAP CCM this is not such a viable option as in any case the CCM requires a 640+ web application server to function, while it is an add on solution independant of SRM_SERVER, it is not independant of SAP WEBAS!
    So, to use the SAP CCM the customer requires either a satellite location with a SAP WEBAS or their own to host this application. From here, the system would need to be configured and conform to the details in the OCI 4.0 documentation for either XML communication or OCI interface communication, so, I guess, at least from my perspective using a SAP CCM system in conjunction with an external ERP system is not the best option when it may be easier to integrate other catalog solutions into such a setup.
    Regards,
    Jason

  • /usr/sap/ccms is above the threshold value

    Hi,
    Can you guide me with this one, what are the files should be deleted with this directory? Where I can find those files?
    Hoping for your immediate response.
    Regards,

    Hi,
    Please login from os level
    cd /usr/sap/ccms
    Check the Sizes of the directory du -sk *
    It will give the size of all the directory and files.
    Please find that directory which is very large and go to that directory and find which files are very large and date of that files.(old files)
    Check the old files which are present and also still they are using it or not.If they are not in use you can move that files into another directory which has free space.
    Check for one week if there is no any inconsistency and then you can delete that files.
    Please take the proper approvals before deleting it.
    Other wise please inform to the backup team to take backup of that directory.
    or
    Each agent can generate 500mb data in the ../traces and ../data directories if this fills up the file system, in case of emergency when can delete the contents of
    /usr/sap/ccms/wilyintroscope/traces
    /usr/sap/ccms/wilyintroscope/data
    Then restart the EM
    To reduce the required space open the ./config/IntroscopeEnterpriseManager.properties file, and you can find the entries as below:
    introscope.enterprisemanager.transactionevents.storage.max.data.age=N
    #The trace files under "traces" folder will be deleted after N days.
    introscope.enterprisemanager.smartstor.tier3.age=N
    #The historical files under "data" folder will finally be deleted after N days
    introscope.enterprisemanager.transactionevents.storage.optimize.time offsethour
    #It's only about the time to run the "house keeping".
    Please adjust the settings accordingly. These changes will not have a immediate effect to the current situation. The simplest way to solve the problem is just to delete the whole "data" and "traces" folder. EM will automatically re-create these new folders when restarting. But please be aware that the historical data will be lost, so we suggest backing up the historical files first. From then on, the "house keeping" work will run in the new way as we have modified.
    Alternately one can put the /data directory on a different disk drive / disk controller. For this purpose, change
    the following properties in the file config/IntroscopeEnterpriseManager.properties:
    introscope.enterprisemanager.smartstor.directory=/your/separate/drive/data
    introscope.enterprisemanager.smartstor.directory.archive=/your/separate/drive/archive
    introscope.enterprisemanager.smartstor.dedicatedcontroller=true
    Regards
    Sreedhar Reddy
    Edited by: Sreedhar Reddy on Feb 23, 2009 11:42 PM

  • SAP R/3 Installation : Dispatcher not starting up.

    Hi,
       I'm trying to Install SAP R/3 Enterprise ABAP on Windows: Oracle. Central Instance, Database Instance & Gateway Instance Installation went smoothly without any problems.
       But when I tried to start the SAP system the Dispatcher is not starting.
       I'm getting following error which is listed below from various files like dev_wx, dev_ms, stderrx & dev_rfc.
    <u><b>dev_rfc.trc file</b></u>
    >TS> Fri Jun 03 14:02:41 2005
    T:5268 ======> Connect to SAP gateway failed
    Connect_PM  TPNAME=IGS.C01, GWHOST=wipro, GWSERV=3300
    ERROR       partner not reached (host 10.119.2.66, service 3300)
    TIME        Fri Jun 03 14:02:41 2005
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -10
    MODULE      nixxi_r.cpp
    LINE        8593
    DETAIL      NiPConnect2
    SYSTEM CALL SiPeekPendConn
    ERRNO       10061
    ERRNO TEXT  WSAECONNREFUSED: Connection refused
    COUNTER     2
    <u><b>dev_ms file</b></u>
    [Thr 5884] Fri Jun 03 17:51:27 2005
    [Thr 5884] systemid   560 (PC with Windows NT)
    [Thr 5884] relno      6400
    [Thr 5884] patchlevel 0
    [Thr 5884] patchno    12
    [Thr 5884] intno      20020600
    [Thr 5884] pid        5816
    [Thr 5884] ***LOG Q01=> MsSInit, MSStart (Msg Server 1 5816) [msxxserv.c   1655]
    [Thr 5884] MsHttpInit: full qualified hostname = wipro.hobbits
    [Thr 5884] HTTP logging is switch off
    [Thr 5884] set HTTP state to LISTEN
    [Thr 5884] MsHttpOwnDomain: own domain[1] = hobbits
    [Thr 5884] *** I listen to port sapmsC01 (3601) ***
    [Thr 5884] *** HTTP port 8101 state LISTEN ***
    [Thr 5884] CUSTOMER KEY: >P1811225457<
    [Thr 5884] Fri Jun 03 17:51:47 2005
    [Thr 5884] *** ERROR => MsSClientHandle: no server provides service ENQ  (4), requested from wipro_C01_00 [msxxserv.c   4190]
    [Thr 5884] Fri Jun 03 17:52:44 2005
    [Thr 5884] *** ERROR => MsSClientHandle: no server provides service ENQ  (4), requested from wipro_C01_01 [msxxserv.c   4190]
    [Thr 5884] Fri Jun 03 17:52:49 2005
    [Thr 5884] *** ERROR => MsSClientHandle: no server provides service ENQ  (4), requested from wipro_C01_00 [msxxserv.c   4190]
    [Thr 5884] ***LOG Q0I=> NiPRead: recv (10054: WSAECONNRESET: Connection reset by peer) [ninti.c 777]
    [Thr 5884] *** ERROR => MsSRead: NiBufReceive (rc=NIECONN_BROKEN) [msxxserv.c   9101]
    [Thr 5884] *** ERROR => MsSClientHandle: MsSRead C2 (wipro_C01_00), MSEINTERN [msxxserv.c   3765]
    [Thr 5884] Fri Jun 03 18:03:09 2005
    [Thr 5884] *** ERROR => MsSCheckConnections: no response from client C1 (10.119.2.66) after 300 secs received [msxxserv.c   2913]
    [Thr 5884] *** ERROR => MsSCheckConnections: disconnect now [10.119.2.66] [msxxserv.c   2917]
    [Thr 5884] *** ERROR => MsSCheckConnections: no response from client C0 (10.119.2.66) after 300 secs received [msxxserv.c   2913]
    [Thr 5884] *** ERROR => MsSCheckConnections: disconnect now [10.119.2.66] [msxxserv.c   2917]
    <u><b>stderr file</b></u>
    <u><b>stderr2 file</b></u>
    C:\usr\sap\C01\D00\work>echo WHENEVER SQLERROR exit SQL.SQLCODE  1>v9start.sql
    C:\usr\sap\C01\D00\work>echo connect / as sysdba  1>>v9start.sql
    C:\usr\sap\C01\D00\work>echo startup  1>>v9start.sql
    C:\usr\sap\C01\D00\work>echo exit  1>>v9start.sql
    SQL*Plus: Release 9.2.0.5.0 - Production on Fri Jun 3 17:51:27 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected.
    ORA-01081: cannot start already-running ORACLE - shut it down first
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    <u><b>stderr4</b></u>
    work process W0 died => tskh_init: db_connect
    work process W3 died => tskh_init: db_connect
    work process W4 died => tskh_init: db_connect
    work process W5 died => tskh_init: db_connect
    work process W6 died => tskh_init: db_connect
    work process W7 died => tskh_init: db_connect
    work process W2 died => tskh_init: db_connect
    work process W1 died => tskh_init: db_connect
    ICM up and operational (pid: 4100) ***
    Shutdown ICM server ......
    ICM shutdown completed (pid: 4100) ***
    DISPATCHER EMERGENCY SHUTDOWN => DpWPCheck: no more work processes
    <u><b>stderr6</b></u>
    [Thr 3668] Fri Jun 03 17:51:27 2005
    [Thr 3668] *** ERROR => SncPDLInit(): DlLoadLib("sncgss32.dll")=DLENOACCESS
    [sncxxdl.0340][Thr 3668] *** ERROR => SncPDLInit()==SNCERR_INIT, Adapter (#0) sncgss32.dll not loaded
    [sncxxdl.0604][Thr 4144] Fri Jun 03 17:51:28 2005
    [Thr 4144] *** ERROR => SncPDLInit(): DlLoadLib("sncgss32.dll")=DLENOACCESS
    [sncxxdl.0340][Thr 4144] *** ERROR => SncPDLInit()==SNCERR_INIT, Adapter (#0) sncgss32.dll not loaded
    [sncxxdl.0604][Thr 3680] Fri Jun 03 17:51:28 2005
    [Thr 3680] *** ERROR => SncPDLInit(): DlLoadLib("sncgss32.dll")=DLENOACCESS
    [sncxxdl.0340][Thr 3680] *** ERROR => SncPDLInit()==SNCERR_INIT, Adapter (#0) sncgss32.dll not loaded
    [sncxxdl.0604]
        From the above log, it says that there is problem in database connection. But I am not able to figure out where the problem lies & what are the changes that needs to be done.
       Kindly suggest me what needs to be done.
    Cheers,
    Jeetu

    Hi Jeetendra
    I have the same problem of dsipatcher not starting up, i am using XP as operating system , pinning hope that u have got the solutions for the problem
    Here are the below
    1)dev_wo
    trc file: "dev_w0", trc level: 1, release: "620"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, M

    B Wed Oct 19 09:23:41 2005
    B  create_con (con_name=R/3)
    B  Loading DB library 'C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll' ...

    M Wed Oct 19 09:23:42 2005
    M  *** ERROR => DlLoadLib: LoadLibrary(C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll) Error 126 [dlnt.c       226]
    M          Error 126 = "The specified module could not be found."
    B  *** ERROR => Couldn't load library 'C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll'
    [dbcon.c      3789]
    M  systemid   560 (PC with Windows NT)
    M  relno      6200
    M  patchlevel 0
    M  patchno    251
    M  intno      20020600
    M  pid        3660

    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 3660) [dpxxdisp.c   1016]

    I Wed Oct 19 09:23:43 2005
    I  MtxInit: -2 0 0

    X Wed Oct 19 09:23:44 2005
    X  EmInit: MmSetImplementation( 2 ).
    X  <ES> client 0 initializing ....
    X  Using implementation std
    M  <EsNT> Memory Reset enabled as NT default
    X  ES initialized.

    M Wed Oct 19 09:23:50 2005
    M  calling db_connect ...
    B  create_con (con_name=R/3)
    B  Loading DB library 'C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll' ...

    M Wed Oct 19 09:23:55 2005
    M  *** ERROR => DlLoadLib: LoadLibrary(C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll) Error 126 [dlnt.c       226]
    M          Error 126 = "The specified module could not be found."
    B  *** ERROR => Couldn't load library 'C:\usr\sap\PRD\SYS\exe\run\dboraslib.dll'
    [dbcon.c      3789]
    M  ***LOG R19=> tskh_init, db_connect ( DB-Connect 008192) [thxxhead.c   1098]
    M  in_ThErrHandle: 1
    M  *** ERROR => tskh_init: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   8277]

    M  Info for wp 0

    M    stat = 4
    M    reqtype = 1
    M    act_reqtype = -1
    M    tid = -1
    M    mode = 255
    M    len = -1
    M    rq_id = -1
    M    rq_source = 255
    M    last_tid = 0
    M    last_mode = 0
    M    rfc_req = 0
    M    report = >                                        <
    M    action = 0
    M    tab_name = >                              <

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server sap_PRD_00 on host sap (wp 0)
    M  *  ERROR       tskh_init: db_connect
    M  *
    M  *  TIME        Wed Oct 19 09:23:55 2005
    M  *  RELEASE     620
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          13
    M  *  MODULE      thxxhead.c
    M  *  LINE        8408
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >SAP-Trace buffer write< for event BEFORE_DUMP
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c   672]
    M  *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c  235]
    M  Entering ThSetStatError
    M  Entering ThReadDetachMode
    M  call ThrShutDown (1)...
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 3660) [dpnttool.c   345]
    2)stder
    C:\usr\sap\PRD\DVEBMGS00\work>echo WHENEVER SQLERROR exit SQL.SQLCODE  1>v9start.sql
    C:\usr\sap\PRD\DVEBMGS00\work>echo connect / as sysdba  1>>v9start.sql
    C:\usr\sap\PRD\DVEBMGS00\work>echo startup  1>>v9start.sql
    C:\usr\sap\PRD\DVEBMGS00\work>echo exit  1>>v9start.sql
    'sqlplus' is not recognized as an internal or external command,
    operable program or batch file.
    3)dev_rfc
    ERROR file opened at 20060207 010848 India Standard , SAP-REL 620,0,252 RFC-VER 3 500897 MT-SL
    T:2608 Error RFCIO_ERROR_MESSAGE in abrfcio.c : 1360
    T:2608 <* RfcDispatch [1] : returns 1:RFC_FAILURE
    4)dev_ms
    trc file: "dev_ms", trc level: 1, release: "620"
    [Thr 2316] Wed Oct 19 09:23:36 2005
    [Thr 2316] MsSSetTrcLog: trc logging not active
    [Thr 2316] relno      6200
    [Thr 2316] patchlevel 0
    [Thr 2316] patchno    125
    [Thr 2316] intno      20020600
    [Thr 2316] pid        2328
    [Thr 2316] ***LOG Q01=> MsSInit, MSStart (Msg Server 1 2328) [msxxserv.c   1515]
    [Thr 2316] MsHttpPortInsert: set HTTP state to LISTEN
    [Thr 2316] *** I listen to port sapmsPRD (3600) ***
    [Thr 2316] *** HTTP LISTEN ***
    [Thr 2316] *** I listen to HTTP port 8100 ***
    [Thr 2316] CUSTOMER KEY: >B0642345523<
    [Thr 2316] Wed Oct 19 09:24:27 2005
    [Thr 2316] *** ERROR => MsSClientHandle: no server provides service ENQ  (4), requested from sap_PRD_00 [msxxserv.c   3957]
    [Thr 2492] Wed Oct 19 09:27:02 2005
    [Thr 2492] MsSExit: received SIGINT (2)
    [Thr 2492] ***LOG Q02=> MsSHalt, MSStop (Msg Server 2328) [msxxserv.c   4786]
    5) dev_disp
    trc file: "dev_disp", trc level: 1, release: "620"
    Wed Oct 19 09:23:38 2005
    ERROR => DlLoadLib: LoadLibrary(dboraslib.dll) Error 126 [dlnt.c       226]
            Error 126 = "The specified module could not be found."
    systemid   560 (PC with Windows NT)
    relno      6200
    patchlevel 0
    patchno    251
    intno      20020600
    pid        2120
    ***LOG Q00=> DpSapEnvInit, DPStart (00 2120) [dpxxdisp.c   966]
         shared lib "dw_xml.dll" version 252 successfully loaded
         shared lib "dw_xtc.dll" version 252 successfully loaded
         shared lib "dw_stl.dll" version 252 successfully loaded
    MtxInit: -2 0 0
    MBUF state OFF
    EmInit: MmSetImplementation( 2 ).
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation std
    <EsNT> Memory Reset enabled as NT default
    <EsNT> EsIUnamFileMapInit: Initialize the memory 268 MB
    <ES> 267 blocks reserved for free list.
    ES initialized.
    Wed Oct 19 09:23:39 2005
    ***LOG Q0K=> DpMsAttach, mscon ( sap) [dpxxdisp.c   8832]
    Wed Oct 19 09:23:40 2005
    CCMS: Initalizing shared memory of size 20000000 for monitoring segment.
    Wed Oct 19 09:23:42 2005
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 6200, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   940]
    DpMsgAdmin: Set patchno for this platform to 251
    Release check o.K.
    Wed Oct 19 09:24:21 2005
    ERROR => W0 (pid 3660) died [dpxxdisp.c   11210]
    ERROR => W1 (pid 3728) died [dpxxdisp.c   11210]
    ERROR => W2 (pid 3716) died [dpxxdisp.c   11210]
    ERROR => W3 (pid 4048) died [dpxxdisp.c   11210]
    ERROR => W4 (pid 3704) died [dpxxdisp.c   11210]
    ERROR => W5 (pid 3700) died [dpxxdisp.c   11210]
    ERROR => W6 (pid 3684) died [dpxxdisp.c   11210]
    ERROR => W7 (pid 3692) died [dpxxdisp.c   11210]
    ERROR => W8 (pid 3896) died [dpxxdisp.c   11210]
    ERROR => W9 (pid 3672) died [dpxxdisp.c   11210]
    ERROR => W10 (pid 2620) died [dpxxdisp.c   11210]
    ERROR => W11 (pid 3628) died [dpxxdisp.c   11210]
    ERROR => W12 (pid 3620) died [dpxxdisp.c   11210]
    ERROR => W13 (pid 3580) died [dpxxdisp.c   11210]
    ERROR => W14 (pid 3612) died [dpxxdisp.c   11210]
    ERROR => W15 (pid 380) died [dpxxdisp.c   11210]
    ERROR => W16 (pid 3624) died [dpxxdisp.c   11210]
    my types changed after wp death/restart 0xbf --> 0x80
    DP_FATAL_ERROR => DpEnvCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    ERROR => DpMBufRead: state MBUF_PREPARED, opmode MBUF_USE [dpxxmbuf.c   503]
    ERROR => DpModState: DpMBufRead failed (-1) [dpxxdisp.c   13129]
    Wed Oct 19 09:24:27 2005
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   9058]
    MBUF state OFF
    MBUF component DOWN
    Wed Oct 19 09:24:28 2005
    ***LOG Q05=> DpHalt, DPStop ( 2120) [dpxxdisp.c   7637]
    kindly help me to solve and able to connect to server
    and please let me know step by step solutions as i am very much new
    Thanking you my emial id ([email protected])

  • Where do we find a box command in sap script

    Hai,
    where do we find a box command in sap script, how to create box command ,
    its urgent help out

    Hi
    SAPScripts
    POSITION WINDOW
    SIZE WIDTH '160' MM HEIGHT '140' MM
    BOX FRAME 10 TW
    Box
    BOX HEIGHT '11' MM WIDTH '160' MM FRAME 10 TW INTENSITY 35
    linessssssss
    BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW
    Boxes, Lines, Shading: BOX, POSITION, SIZE
    Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
    The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    BOX Command
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
    XPOS, YPOS
    Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    WIDTH
    Width of the box. Default: WIDTH value of the SIZE command.
    HEIGHT
    Height of the box. Default: HEIGHT value of the SIZE command.
    FRAME
    Thickness of frame.
    Default: 0 (no frame).
    INTENSITY
    Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    TW (twip)
    PT (point)
    IN (inch)
    MM (millimeter)
    CM (centimeter)
    LN (line)
    CH (character).
    The following conversion factors apply:
    1 TW = 1/20 PT
    1 PT = 1/72 IN
    1 IN = 2.54 CM
    1 CM = 10 MM
    1 CH = height of a character relative to the CPI specification in the form header
    1 LN = height of a line relative to the LPI specification in the form header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shading having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    POSITION Command
    Syntax
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
    Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
    XORIGIN, YORIGIN
    Origin of the coordinate system.
    WINDOW
    Sets the values for the left and upper edges to match those of the current window (default setting).
    PAGE
    Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
    /: POSITION WINDOW
    Sets the origin for the coordinate system to the upper left corner of the window.
    /: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
    Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
    /: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
    Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
    SIZE Command
    Syntax
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
    Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
    WIDTH, HEIGHT
    Dimensions of the rectangle or line.
    WINDOW
    Sets the values for the width and height to the values of the current window (default setting).
    PAGE
    Sets the values for the width and height to the values of the current output page.
    /: SIZE WINDOW
    Sets WIDTH and HEIGHT to the current window dimensions.
    /: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
    Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
    /: POSITION WINDOW
    /: POSITION XORIGIN -20 TW YORIGIN -20 TW
    /: SIZE WIDTH +40 TW HEIGHT +40 TW
    /: BOX FRAME 10 TW
    A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    Regards
    anji

  • Adding Data to the database for SAP Transactions

    Hi
    I'm new to the whole ABAP. I would like to enquire about adding transaction data in SAP through ABAP but it must be immediate.
    I know that one can use a BAPI to add data and can rollback if any problems occur.
    But if no BAPI exists how does one write code to add a document to the SAP database but with everything SAP transaction requires like the BAPI. What is the process and how???
    So let say I wanted to do FB01 which is SAP FI document and must be immediate. There is a BAPI that exists for it but if there was not one how would I do this???
    I know one can also use BDC but that creates a batch and then needs to be executed in SM35, I want a way to add data for two or three SAP transactions, if any problems occur with any of the steps rollback everything else commit everything to the database.
    Any simple detail examples (code) that satisfy the above will be greatly appreciated and REWARDED.
    Thanks in advance

    Luis,
    i have a code exactly same BDC for FB01.
    refer:
    REPORT z_etching_fb01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *etching invoice load
    INCLUDE bdcrecx1.
    TYPE-POOLS: truxs , slis.
    *PARAMETERS: dataset(132) LOWER CASE DEFAULT
    *                              'c:\temp\etchingload.txt'.
    PARAMETER: pfile LIKE rlgrap-filename." OBLIGATORY.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETER:    p_kunnr LIKE kna1-kunnr OBLIGATORY,           "kna1-kunnr
                  p_bukrs LIKE bseg-bukrs,
                  p_mwskz LIKE t007a-mwskz OBLIGATORY,"t007a-mwskz
                  p_prctr LIKE cepc-prctr OBLIGATORY,"cepc-prctr
    *            p_newko LIKE ska1-saknr OBLIGATORY DEFAULT 41000000,"
                p_budat LIKE bkpf-budat OBLIGATORY ,
                p_hkont LIKE bseg-hkont OBLIGATORY DEFAULT 41000000 ,
                p_waers TYPE waers OBLIGATORY DEFAULT 'GBP'."tcurr-waers
    SELECTION-SCREEN END OF BLOCK a.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETER : report AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK b.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    *                          ALV                                           *
    DATA: it_fieldcat     TYPE    slis_t_fieldcat_alv,
          wa_fieldcat     LIKE    LINE OF it_fieldcat,
          it_top_of_page  TYPE    slis_t_listheader,
          ls_layout       TYPE    slis_layout_alv,
          gt_events       TYPE    slis_t_event.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA: BEGIN OF record,
    * data element: BLDAT
            bldat_001(010),   "Invoice Date
    * data element: BLART
            blart_002(002),   " Doc Type DR or DG if credit
    * data element: BUKRS
            bukrs_003(004),   " Company Code
    * data element: BUDAT
            budat_004(010),   "Posting Date
    * data element: MONAT
            monat_005(002),   "period"
    * data element: WAERS
            waers_006(005),   "Currency
    * data element: XBLNR1
            xblnr_007(016),   "Invoice Number
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SAEOBJART
            docid_009(010),
    * data element: NEWBS
            newbs_010(002),   "posting Key
    * data element: NEWKO
            newko_011(017),   "Customer number or GL account
    * data element: WRBTR
            wrbtr_012(016),   "Amount
    * data element: DZTERM
            zterm_013(004),
    * data element: DZBD1T
            zbd1t_014(003),
    * data element: DZFBDT
            zfbdt_015(010),
    * data element: DZUONR
            zuonr_016(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_017(050),   " PO number
    * data element: NEWBS
            newbs_018(002),
    * data element: NEWKO
            newko_019(017),   "GL Account
    * data element: WRBTR
            wrbtr_020(016),   "Amount
    * data element: MWSKZ
            mwskz_021(002),   "Tax
    * data element: DZUONR
            zuonr_022(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_023(050),   "PO Number
    * data element: PRCTR
            prctr_024(010),   "Profit Center
    * data element: WRBTR
            wrbtr_025(016),   " Amount
    * data element: MWSKZ
            mwskz_026(002),   "Tax
    * data element: DZUONR
            zuonr_027(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_028(050),   "PO Number
    * data element: FMORE
            fmore_029(001),
    * data element: PRCTR
            prctr_030(010),   "Pr Center
    * data element: FWSTE
            fwste_01_031(016),
          END OF record.
    DATA: BEGIN OF it_excel OCCURS 0,
    * data element: XBLNR1
          xblnr_007(016),   "Invoice Number
    * data element: BLDAT
          bldat_001(010),   "Invoice Date
    * data element: WRBTR
          wrbtr_012(016),   "Amount
    * data element: WRBTR
          wrbtr_025(016),   " Tax Amount
    * data element: WRBTR
          wrbtr_020(016),   "Gross Amount
    * data element: BLART
          blart_002(002),   " No of units
    * data element: MONAT
          monat_005(002),   "No of units second test"
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SGTXT
          sgtxt_017(050),   " PO number
    * data element: BUKRS
          bukrs_003(004),   " Company Code
    * data element: BUDAT
          budat_004(010),   "Posting Date
    *        budat_004 TYPE string,   "Posting Date
    * data element: WAERS
          waers_006(005),   "Currency*
    * data element: NEWKO
          newko_011(017),   "Customer number or GL account
    * data element : kunnr
          kunnr_019(010),   " customer
          mwskz(002),
         prctr(010),
          date(002),
          month(002),
    ** data element: BKTXT
    *      bktxt_008(025),   "PO number
    ** data element: SAEOBJART
    *      docid_009(010),
    ** data element: NEWBS
    *      newbs_010(002),   "posting Key
    ** data element: DZTERM
    *      zterm_013(004),
    ** data element: DZBD1T
    *      zbd1t_014(003),
    ** data element: DZFBDT
    *      zfbdt_015(010),
    ** data element: DZUONR
    *      zuonr_016(018),   "Invoice Number
    ** data element: NEWBS
    *      newbs_018(002),
    ** data element: NEWKO
    *      newko_019(017),   "GL Account
    ** data element: MWSKZ
    *      mwskz_021(002),   "Tax
    ** data element: DZUONR
    *      zuonr_022(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_023(050),   "PO Number
    ** data element: PRCTR
    *      prctr_024(010),   "Profit Center
    ** data element: MWSKZ
    *      mwskz_026(002),   "Tax
    ** data element: DZUONR
    *      zuonr_027(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_028(050),   "PO Number
    ** data element: FMORE
    *      fmore_029(001),
    ** data element: PRCTR
    *      prctr_030(010),   "Pr Center
    ** data element: FWSTE
    *      fwste_01_031(016),
        END OF it_excel.
    DATA : BEGIN OF it_bkpf OCCURS 0,
            belnr LIKE bkpf-belnr,
            budat LIKE bkpf-budat,
            bldat LIKE bkpf-bldat,
            xblnr LIKE bkpf-xblnr,
            bktxt LIKE bkpf-bktxt,
            total LIKE bseg-dmbtr,
            numdocs TYPE p DECIMALS 0,
            END OF it_bkpf,
            BEGIN OF it_bseg OCCURS 0,
              belnr LIKE bseg-belnr,
              dmbtr LIKE bseg-dmbtr,
              mwsts LIKE bseg-mwsts,
              pswsl LIKE bseg-pswsl,
              END OF it_bseg,
              BEGIN OF it_final OCCURS 0,
                belnr LIKE bkpf-belnr,
                budat LIKE bkpf-budat,
                bldat LIKE bkpf-bldat,
                xblnr LIKE bkpf-xblnr,
                bktxt LIKE bkpf-bktxt,
                dmbtr LIKE bseg-dmbtr,
                mwsts LIKE bseg-mwsts,
                pswsl LIKE bseg-pswsl,
                END OF it_final.
    ***** End generated data section ***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
      PERFORM sub_browse_file. "Get file name
    START-OF-SELECTION.
      PERFORM sub_data_load.  " Transfer excel into internal table.
      PERFORM sub_calc_excel.
      IF report = 'X'.
    *    PERFORM data_selection.
    *    PERFORM data_move.
    *********************************GET ALV  DATA
        PERFORM alv_get_data.
    *********************************ALV GRID DATA
        PERFORM alv_grid.
      ENDIF.
    *if report = ''.
    *  PERFORM write.
    *  PERFORM open_dataset USING dataset.
      PERFORM open_group.
    *  DO.
    *    READ DATASET dataset INTO record.
      LOOP AT it_excel.
    *   IF sy-subrc <> 0. EXIT. ENDIF.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'
                                      it_excel-bldat_001.
        PERFORM bdc_field       USING 'BKPF-BLART'
                                      'DR'." record-blart_002.
        PERFORM bdc_field       USING 'BKPF-BUKRS'
                                      it_excel-bukrs_003.
        PERFORM bdc_field       USING 'BKPF-BUDAT'
                                      it_excel-budat_004.
        PERFORM bdc_field       USING 'BKPF-MONAT'
                                    '3'. "record-monat_005.
        PERFORM bdc_field       USING 'BKPF-WAERS'
                                      it_excel-waers_006.
        PERFORM bdc_field       USING 'BKPF-XBLNR'
                                      it_excel-xblnr_007.
        PERFORM bdc_field       USING 'BKPF-BKTXT'
                                      it_excel-bktxt_008.
        PERFORM bdc_field       USING 'FS006-DOCID'
                                     '*' ."record-docid_009.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                    '01'." record-newbs_010.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                    it_excel-kunnr_019  .
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                    it_excel-wrbtr_020."  it_excel-wrbtr_012.
        PERFORM bdc_field       USING 'BSEG-ZTERM'
                                      'NT30' ."  record-zterm_013.
        PERFORM bdc_field       USING 'BSEG-ZBD1T'
                                      '30'."record-zbd1t_014.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                      it_excel-bldat_001."record-zfbdt_015.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      it_excel-xblnr_007."record-zuonr_016.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      it_excel-sgtxt_017.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                     '50'." record-newbs_018.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                   it_excel-newko_011."  record-newko_019."Gl account
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-SGTXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      it_excel-wrbtr_012."changes from 12 to 20
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                     it_excel-mwskz." record-mwskz_021.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                    it_excel-xblnr_007."  record-zuonr_022.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017."  record-sgtxt_023.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PRCTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                    it_excel-prctr ." record-prctr_024.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=STER'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                     it_excel-wrbtr_012." it_excel-wrbtr_025.
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                      it_excel-mwskz.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                     it_excel-xblnr_007." record-zuonr_027.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017." record-sgtxt_028.
        PERFORM bdc_field       USING 'DKACB-FMORE'
                                     'X' ."record-fmore_029.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PARGB'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                     it_excel-prctr." record-prctr_030.
        PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSET-FWSTE(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=GOBU'.
        PERFORM bdc_field       USING 'BSET-FWSTE(01)'
                                    it_excel-wrbtr_025."  record-fwste_01_031.
        PERFORM bdc_transaction USING 'FB01'.
        REFRESH:bdcdata,messtab.
      ENDLOOP.
      REFRESH:bdcdata.
    **    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BKPF-BLDAT'
    *                                  record-bldat_001.
    *    PERFORM bdc_field       USING 'BKPF-BLART'
    *                                  record-blart_002.
    *    PERFORM bdc_field       USING 'BKPF-BUKRS'
    *                                  record-bukrs_003.
    *    PERFORM bdc_field       USING 'BKPF-BUDAT'
    *                                  record-budat_004.
    *    PERFORM bdc_field       USING 'BKPF-MONAT'
    *                                  record-monat_005.
    *    PERFORM bdc_field       USING 'BKPF-WAERS'
    *                                  record-waers_006.
    *    PERFORM bdc_field       USING 'BKPF-XBLNR'
    *                                  record-xblnr_007.
    *    PERFORM bdc_field       USING 'BKPF-BKTXT'
    *                                  record-bktxt_008.
    *    PERFORM bdc_field       USING 'FS006-DOCID'
    *                                  record-docid_009.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_010.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_011.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_012.
    *    PERFORM bdc_field       USING 'BSEG-ZTERM'
    *                                  record-zterm_013.
    *    PERFORM bdc_field       USING 'BSEG-ZBD1T'
    *                                  record-zbd1t_014.
    *    PERFORM bdc_field       USING 'BSEG-ZFBDT'
    *                                  record-zfbdt_015.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_016.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_017.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_018.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_019.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-SGTXT'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_020.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_021.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_022.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_023.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PRCTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_024.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-WRBTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=STER'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_025.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_026.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_027.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_028.
    *    PERFORM bdc_field       USING 'DKACB-FMORE'
    *                                  record-fmore_029.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PARGB'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_030.
    *    PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSET-FWSTE(01)'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=GOBU'.
    *    PERFORM bdc_field       USING 'BSET-FWSTE(01)'
    *                                  record-fwste_01_031.
    *    PERFORM bdc_transaction USING 'FB01'.
    *  ENDDO.
      PERFORM close_group.
    *  PERFORM close_dataset USING dataset.
    *endif.
    *&      Form  sub_browse_file
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_browse_file .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
    *   FIELD_NAME          = ' '
       IMPORTING
         file_name           = pfile.
    ENDFORM.                    " sub_browse_file
    *&      Form  sub_data_load
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_data_load .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *     I_FIELD_SEPERATOR          =
          i_line_header              = 'X'
          i_tab_raw_data             = it_raw
          i_filename                 = pfile
        TABLES
          i_tab_converted_data       = it_excel[]
    *   EXCEPTIONS
    *     CONVERSION_FAILED          = 1
    *     OTHERS                     = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " sub_data_load
    **&      Form  data_selection
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_selection .
    *  SELECT * FROM bkpf
    *      INTO CORRESPONDING FIELDS OF TABLE it_bkpf
    *      WHERE budat = p_budat AND
    *      bukrs = p_bukrs.
    *  IF NOT it_bkpf[] IS INITIAL.
    *    SELECT belnr dmbtr mwsts pswsl
    *        FROM bseg INTO TABLE it_bseg
    *        FOR ALL ENTRIES IN it_bkpf
    *        WHERE belnr = it_bkpf-belnr AND
    *        kunnr = p_kunnr AND
    *        hkont = p_hkont AND
    *        pswsl = p_waers.
    *  ENDIF.
    *ENDFORM.                    " data_selection
    **&      Form  data_move
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_move.
    *  SORT : it_bseg BY belnr,
    *          it_bkpf BY belnr.
    *  LOOP AT it_bseg.
    *    it_final-dmbtr = it_bseg-dmbtr.
    *    it_final-belnr = it_bseg-belnr.
    *    it_final-mwsts = it_bseg-mwsts.
    *    it_final-pswsl = it_bseg-pswsl.
    *    READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr BINARY SEARCH.
    *    IF sy-subrc = 0.
    *      it_final-budat = it_bkpf-budat.
    *      it_final-bldat = it_bkpf-bldat.
    *      it_final-xblnr = it_bkpf-xblnr.
    *      it_final-bktxt = it_bkpf-bktxt.
    *    ENDIF.
    *    APPEND it_final.
    *    CLEAR it_final.
    *  ENDLOOP.
    *ENDFORM.                    " data_move
    *&      Form  alv_get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_get_data .
      CLEAR it_fieldcat.
    ***************** Document number
    *  wa_fieldcat-col_pos    = '1'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'XBLNR_007'.
      wa_fieldcat-seltext_m  = 'Document number'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************** Posting Date
    *  wa_fieldcat-col_pos    = '2'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'BUDAT_004'.
      wa_fieldcat-seltext_m  = 'Posting Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 20.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************** Document Date
    *  wa_fieldcat-col_pos    = '3'.                     " ALV O/P COL-2
      wa_fieldcat-fieldname  = 'BLDAT_001'.
      wa_fieldcat-seltext_m  = 'Document Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ********************* REFERENCE DOCUMENT
    **  wa_fieldcat-col_pos    = '4'.                     " ALV O/P COL-2
    *  wa_fieldcat-fieldname  = 'XBLNR'.
    *  wa_fieldcat-seltext_m  = 'REFERENCE DOCUMENT'.
    *  wa_fieldcat-just       = 'L'.
    *  wa_fieldcat-tabname    = 'IT_EXCEL'.
    **  wa_fieldcat-outputlen  = 15.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR wa_fieldcat.
    ***************** DOCUMENT HEADER TEXT
    *  wa_fieldcat-col_pos    = '5'.                     " ALV O/P COL-3
      wa_fieldcat-fieldname  = 'SGTXT_017'.
      wa_fieldcat-seltext_m  = 'DOCUMENT HEADER TEXT'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *******************Invoice Net amount
    *  wa_fieldcat-col_pos    = '6'.                     " ALV O/P COL-4
      wa_fieldcat-fieldname  = 'WRBTR_012'.
      wa_fieldcat-seltext_m  = 'Invoice Net amount'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** Tax Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_025'.
      wa_fieldcat-seltext_m  = 'Tax Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** NEt Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_020'.
      wa_fieldcat-seltext_m  = 'Net Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** General ledger currency
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WAERS_006'.
      wa_fieldcat-seltext_l  = 'General ledger currency'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 25.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " alv_get_data
    *&      Form  alv_grid
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_grid .
    *  PERFORM fill_list_header USING it_top_of_page[].
    *  PERFORM event-build USING gt_events[].
      PERFORM fill_layout USING ls_layout.
    MESSAGE 'Please press F3 to generate a session or call transaction method after getting report!' TYPE 'I'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = ls_layout
          it_fieldcat        = it_fieldcat
          it_events          = gt_events[]
          i_save             = 'A'
        TABLES
          t_outtab           = it_excel
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_grid
    *                                     FORM FILL_LAYOUT                      *
    FORM fill_layout  USING    p_ls_layout  TYPE slis_layout_alv.
      p_ls_layout-zebra       = 'X'.
      p_ls_layout-cell_merge  = 'X'.
    ENDFORM.                                                         "fill_layout
    *&      Form  sub_calc_excel
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_calc_excel .
          data: idate TYPE sy-datum,
              tdat8 type string.
      LOOP AT it_excel.
        CONCATENATE  it_excel-blart_002 '/' it_excel-monat_005 '/' it_excel-bktxt_008 INTO
            it_excel-sgtxt_017.
        it_excel-bukrs_003 = p_bukrs.
    *    it_excel-budat_004 = p_budat.
        it_excel-waers_006 = p_waers.
        it_excel-newko_011 = p_hkont.
        it_excel-kunnr_019 = p_kunnr.
        it_excel-mwskz     = p_mwskz.
        it_excel-prctr     = p_prctr.
        idate              = p_budat.
        CALL FUNCTION 'DATUMSAUFBEREITUNG'
         EXPORTING
    *       FLAGM                 = ' '
    *       FLAGW                 = ' '
           IDATE                 = idate
    *       IMONT                 = ' '
    *       IWEEK                 = ' '
         IMPORTING
    *       MDAT4                 =
    *       MDAT6                 =
    *       TDAT4                 =
    *       TDAT6                 =
            TDAT8                 = tdat8
    *       WDAT4                 =
    *       WDAT6                 =
    *     EXCEPTIONS
    *       DATFM_UNGUELTIG       = 1
    *       DATUM_UNGUELTIG       = 2
    *       OTHERS                = 3
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
          it_excel-budat_004 = tdat8.
    *    CONCATENATE it_excel-budat_004+4(2) '/' it_excel-budat_004+6(2) '/'  it_excel-budat_004+0(4)
    *                INTO it_excel-budat_004.
    *    SPLIT it_excel-bldat_001 AT '/' INTO it_excel-month it_excel-date.
    *    CONCATENATE it_excel-date '.' it_excel-month '.' it_excel-bldat_001+6(4) INTO it_excel-bldat_001.
        MODIFY it_excel.
        CLEAR it_excel.
      ENDLOOP.
    ENDFORM.                    " sub_calc_excel
    *&      Form  write
    *       text
    *  -->  p1        text
    *  <--  p2        text
    *form write .
    *OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *data: wa_excel like line of it_excel.
    *loop at it_excel into wa_excel.
    *TRANSFER wa_excel to dataset.
    *endloop.
    *CLOSE DATASETdataset.
    *endform.                    " write

  • Records are not deleting in SAP CCM (CCM2.0), eventhough Action code 03 is

    Hi all,
    We are facing a problem in SAP CCM 2.0, products are not deleting from Catalogs ( Internal Catalogs)  eventhough action code '03' ( Deletion) is passing to Catalogs.
    In case of updating and new records creation is working fine , changes are updating and new records getting added to catalogs.
    Could you please advise why deletion is not working. what would be the reason.
    Is there any other way to delete the records from the Catalog.
    thanks in advance

    Hi,
    There is no standard functionality for deleting items from SRM CCM 2.0.
    Very recently, we have come across the same problem that materials/items which are deleted in SAP R/3 4.7 are not getting deleted from SRM CCM 2.0 catalog.
    We have done some analysis and found the below solution.
    - You need to send an action code "04" and drop Product Category information in XML file which XI uses to send the information from ERP to SRM CCM catalog.
    For this you need to modify the XML and XI mapping for the ZACTION code(03) received from ERP.
    Once the changes are done in XML, you re-publish the catalog.
    You will find the item/s have got deleted from the catalog.
    Note: It is important to note that even for deletion, system records action as catalog items Update/Created in the logs (SLG1) but not the action as catalog items deleted.
    Hope this helps !
    Regards,
    Vikas

  • Can SAP/CCMS automatically clear the RZ20 alerts after 30 days?

    Can SAP/CCMS automatically clear the RZ20 alerts after 30 days?
    And if so, how?

    Hi William,
    You can reorganize the completed alerts using the analysis method for AlertsInDB. The method deletes older alerts that match your specifications and reduced the space occupied in the database. To do this, proceed as follows:
       1. Choose CCMS ® Control/Monitoring ® Alert Monitor, or call transaction RZ20.
       2. Expand the SAP CCMS Technical Expert Monitors monitor set, place the cursor on the CCMS Selfmonitoring monitor, and choose Start Monitor.
       3. Expand the alert monitoring tree. You will find the monitoring object for which you are looking under CCMS_Selfmonitoring ® Runtime ® AlertsInDB. Select the object and choose Start Analysis Method.
       4. Specify the date and time from which completed alerts are to be deleted.
    Regards,
    suraj

  • SAP Script : Control Commands for printing Label (barcode) by Zebra Printer

    Hello,
    I would like to know the control commands in sap script for Zebra Printer. The purpose of task is to print a field in barcode format in Right Bottom of the label.
    The sample code is placed below. Kindly have a look at it. The problem now i am facing is, the barcode for Customer PO is printing on the wrong place (Left Bottom, the text & barcode are overwriting). Can anyone suggest a possible way or can any one send the document for Barcode commands in SAP Script for Zebra Printer.
    Sample script code:
    Initialization and reset Barcode
    XAMCY^XZ
    Start
    ^XA
    Barcode setup
    ^BY3,2.7,2.2
    Set label home position
    ^LH
    ^FWN
    FO385,025A0R,40,50FDPN: &VBAP-MATNR&FS
    FO385,725A0R,40,50FD&VBAP-ARKTX&FS
    FO385,1710A0R,40,50FDRtns: &zsntsc-contr&FS
    FO345,025A0R,40,50FDService Order# &AUFK-AUFNR&FS
    FO345,725A0R,40,50FDSerial# &EQUI-SERNR&FS
    FO345,1710A0R,40,50FDRepair Order# &VBAP-VBELN&FS
    FO245,025B3R,N,90,N,NFD&AUFK-AUFNR&FS
    FO245,725B3R,N,90,N,NFD&EQUI-SERNR&FS
    FO245,1710B3R,N,90,N,NFD&VBAP-VBELN&FS
    FO138,1710A0R,40,35FDCustomer PO# &VBKD-BSTKD&FS
    FO98,025A0R,40,50FDWrnty: &W_WARRANTY&FS
    FO98,605A0R,40,50FDRoute: &W_ROUTE&FS
    FO58,025A0R,40,35FDShip-to-name: &W_NAME1&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO58,1325A0R,40,35FDMinor Group/Nr: &TVM5T-BEZEI&FS
    FO18,885A0R,40,35FDReported By: &QMEL-QMNAM&FS
    FO18,1710B3R,N,90,N,NFD&VBKD-BSTKD&FS
    ^XZ
    Thanks in Advance,
    Ramasamy

    HI
    GOOD
    GO THROUGH THIS
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes. 
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor. 
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    GO THROUGH THESE LINKS
    http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/4a0d5b74110d44b1b88d9b6aa1315b/content.htm
    THANKS
    MRUTYUN

  • Does SAP create missing files TRACExx when starting up?

    Hi there,
    I'm working on a documentation regarding a system copy from a productive system to a consolidation system.
    We're using Sun Solaris 10/64Bit with Oracle 10g2 and Netweaver 7.00.
    In the directory /usr/sap/<SID>/DVEBMGS_xx/log there are several files SAP uses:
    - ALALERTS
    - ALMTTREE
    - ALPERFHI
    - ENQBCK
    - SLOGxx
    - TRACE
    - TRACE00...TRACE07
    My question concerns the TRACE-files. Only the file TRACE seems to be used by the consolidation system, but there are still eight files TRACE00 up to TRACE07 that were last accessed in 2008 and before.
    These files are filled with data from former consolidation systems that got overwritten everytime by the system copy. Now, after the new copy, the SAP system is still down. May I delete these files? Does SAP create these files new when starting up?
    Greetz, Uwe.

    Hi,
    Yes you can delete those files at any time. Check SAP Note 16513, it may help you.
    Thanks,
    Sushil

  • How to use Net use command in SAP

    Dear All,
    Any one knows how to user Net use command in SAP to connect to other system  i have Created in SM69. when i am executing the program it is asking login Details of other system.
    Regards
    SNB

    Hi,
    What is the exact command you exceuting?
    Message was edited by:
            Pavel sheynkman

  • Execute DOS command from SAP

    hi experts ,
    i need to execute DOS command from SAP .
    earlier we have 'GUI_EXEC' WS_EXECUTE , 'WS_DOWNLOAD' etc which are Obsolete now.
    as we are using ECC6.0. kindly guide how to do this.
    best regards,
    Rahul

    Try out...
    DSVAS_DOC_WS_EXECUTE_50
    or
    CL_GUI_FRONTEND_SERVICES=>EXECUTE
    <b><REMOVED BY MODERATOR></b>
    Thanks & Regards
    ilesh 24x7
    Message was edited by:
            Alvaro Tejada Galindo

  • Execute a command on SAP server

    HI I have a SAP qith Unix O.S.
    Is there an abap command or function module in order to execute a unix command on SAP?
    example "ls - la" in order to have a list of files
    or
    "ren old.file new.file"
    Thanks

    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
             EXPORTING
                  COMMANDNAME                = COMMANDNAME
                  OPERATINGSYSTEM            = OPERATINGSYSTEM
                  ADDITIONAL_PARAMETERS      = ADDITIONAL_PARAMETERS
             IMPORTING
                  STATUS                     = STATUS
                  EXITCODE                   = EXITCODE
             TABLES
                  EXEC_PROTOCOL              = EXEC_PROTOCOL
    Check the link:-
    http://help.sap.com/saphelp_40b/helpdata/EN/fa/0971fb543b11d1898e0000e8322d00/content.htm
    Hope it helps you..
    Manas M.

  • Is it possible to run host command in sap environment

    hi
    could any body tel me
    is it possible to run host command in sap environment
    then how..?

    yeah , by using FM
    EXECUTE_FUNCTION
    Regards
    Prabhu

  • Is it possible to run host command from SAP environment? How do you run?

    Hi
    Is it possible to run host command from SAP environment? How do you run?
    Thank You

    Hello Subhash
    You will more details in the following thread:
    Re: How to define command for SXPG_COMMAND_EXECUTE
    Regards
      Uwe

Maybe you are looking for