SAPScript(ABAP)

Hi,
hope u r doing well .i have small doubt i.e i have 3 records in a internal table(in print program),i want to show all these records in my form output ,but it is showing only last record .how to capture all the records and show in my form output .pls give ur suggestion with an example.i m waiting for ur reply....
thx in adv.
Regds,
Prabhas

Hi prabhas,
1. for that we have to do two things
2. a) In layout,
     create one text element eg.
     /E  MYELEMENT
     /   &ITAB-FIELD1&
   b) In your driver program,
      inside the loop.
   use the FM WRITE_FORM
     and also provide the element name 'MYELEMENT'
    in the parameter of this FM.
regards,
amit m.

Similar Messages

  • Forms(SAPScript-ABAP)

    Hi Friends,
        I got an assignment, one adobe form which is getting copy from standard form(MEDRUCK) is attached with standard program(SAPFM06P).But they want sapscript form rather using adobe form .
    Could u give right suggestion how to manage this within 2/3 days without disturbing driver program?
    How it can call the new windows,If we are supposed to go for design new form and add some new windows.
    Pls send a sample driver program to call new windows. Pls take it as urgent.
    I will reward for useful answers.
    Thx in Adv.
    Bapi

    Hi BB
    No need to edit driver program .....and no need for elements(/E)....
    if the fields u want to print are related to already existing fields then no need for /E..
    or if the new fields are from same structure/table from where other fields are coming then no need for /E....jst write the new fields in the new created windows as usual....
    if new fields are not in those structure/tables then u have to write a routine in the script window and write a ROUTINE PROGRAM IN SE38......and fatch the data and pass it to the script.....
    thnx
    Rohit

  • Sapscript - abap program

    Hi,
    Can you explain about the program to display a sapscript, with example?
    Thanks in advance.

    Hi Rodrigo,
    First after designing the form, save and activate it and design a drvier program for it. The driver program is used to call the values reuired from the tables into the SAP Script for dispalying in the output.
    In the driver program , use these FM's:
    Open_form => It assign the form and printer, It should be first.
    Start_form =>  It start Writing mode. You can use write_form  in loop to write more than one lines befor End_form. 
    End_form => It end writing mode of current page and will require to start again through Start_form.
    Close_form=> it end the Form. After this you can not start again for created file.
    Sample Driver Prg:
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
      FORM                              = 'ZSCRIPT1'
      LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       CODEPAGE                          = 11
       OTHERS                            = 12
    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 'START_FORM'
    EXPORTING
      ARCHIVE_INDEX          =
       FORM                   = 'ZFORM1'
      LANGUAGE               = ' '
      STARTPAGE              = 'X'
       PROGRAM                = 'ZSCRIPT1'
      MAIL_APPL_OBJECT       =
    IMPORTING
      LANGUAGE               =
    EXCEPTIONS
      FORM                   = 1
      FORMAT                 = 2
      UNENDED                = 3
      UNOPENED               = 4
      UNUSED                 = 5
      SPOOL_ERROR            = 6
      CODEPAGE               = 7
      OTHERS                 = 8
    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 'WRITE_FORM'
    EXPORTING
      ELEMENT                        = ' '
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
       WINDOW                         = 'HEADER'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT                        = ' '
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT                        = ' '
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
       WINDOW                         = 'FOOTER'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'END_FORM'
    IMPORTING
      RESULT                         =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SPOOL_ERROR                    = 3
      CODEPAGE                       = 4
      OTHERS                         = 5
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Is there a way to create new Barcodes for Adobe Printforms

    Hi All,
    As far I know there is currently no way to add new barcodes to the Adobe designer..SAP Note #430887 says the same..
    Can I get any exact SAP note which states that adding new barcodes is not currently possible..
    If there is any way we can do this please let me know..
    Appreciate your time..
    Thanks,
    Sethu

    Hi,
    I hope this will help you.
    MW6 Barcode DLL for SAP R/3 is compatible with SAPsprint and SAPlpd, it allows you to print 1D barcodes.
    Example:
    Code39, Code128, EAN13, EAN8, UPCA and UPCE,
    PDF417, DataMatrix, Aztec and QRCode virtually on any windows printer from SAP R/3 system.
    TBarCode/SAPwin is a Barcode DLL for SAP R/3, SAP ECC and mySAP ERP. This barcode DLL extends SAPsprint, SAPlpd and SAPWIN DLL with barcode printing features.
    TBarCode/SAPwin prints ALL common linear and 2D bar codes on all Windows printers.
    Costly barcode equipment like barcode cartridges, barcode fonts or barcode printers are avoided! TBarCode/SAPwin works with SAPscript, ABAP and SmartForms. All SAP-forms are supported without modification.
    Thanks

  • From where to Start

    Hi all,,I am new learner to ABAP. I want to know from where we need to start ABAP.Becaz as of now I am not following any order.Can anyone tell me the order to follow..
    thanks in advance

    Hi,
    http://cma.zdnet.com/book/abap/index.htm
    Here are the few links which covers topic by topic.
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm SAP Online Help For Dictionary.
    http://www.sappoint.com/abap.html
    for SAPscripts
    ABAP objects and control technology
    IDOC
    SapScript
    Performance tuning
    BAPI Programming
    Visual Basic Integration - Using the DCOM Connector and BAPI OCX (Only available in Danish)
    JAVA and the SAP java connector
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    for keywords
    very useful link for all
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    Modulepool
    http://sap.mis.cmich.edu/sap-abap/abap09/sld007.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    Weblog for receive email and processing it through ABAP
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    BADI
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    For Logical database
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/8b14e2340d11d5b3ba0050dae02d7c/content.htm
    very useful
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Useful link to websites
    http://www.hernangn.com.ar/sap.htm
    Useful for background
    http://www.sappoint.com/basis/bckprsng.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    For posting weblog,
    /people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
    Dynamic Internal table -weblog in sdn
    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
    Smartforms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.allsaplinks.com/smartform_example.html
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Workflow
    http://help.sap.com/saphelp_46c/helpdata/en/c5/e4b7eb453d11d189430000e829fbbd/frameset.htm
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    http://72.14.203.104/search?q=cache:NjFXTBr5lX8J:www.sap-img.com/abap/an-interactive-alv-report.htmALVInteractivereportsABAP&hl=en&gl=in&ct=clnk&cd=5
    Mail
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm(for changing sender address)
    http://www.sap-img.com/fu016.htm
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Sending mail in background or spool mail
    http://www.sap-basis-abap.com/sapac018.htm
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    ALVGRID with refresh
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    For language setting and decimal separator
    /people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
    Oracle queries
    http://sqlzoo.net/
    To format SQL
    http://www.sqlinform.com/
    SCOT settings
    http://www.sap-img.com/basis/basis-faq.htm
    Status Icon [ALV,Table Control,Tab Strip]
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    For multiMedia
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Uploading LOGO in SAP
    http://www.sap-img.com/ts001.htm
    LSMW
    http://www.sap-img.com/sap-data-migration.htm
    http://www.sapgenie.com/saptech/lsmw.htm
    http://www.allsaplinks.com/lsmw.html
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    OOPS ALV
    OOPS - Events.
    Editable ALV
    Tree
    TabStrip
    Multigrid
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    Function Module
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    My Links
    Smartforms
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287(subroutine)
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Table Control
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap-code-samples/table%20control%20in%20abap.pdf
    HRABAP
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    you can see some Standard Program examples in this one..
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    These are the FAQ's that might helps you
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    RFC
    http://johnv.sapgenie.com/docs/RFC.pdf
    http://zerone.samcheok.ac.kr/Asp_pr/Language/.%5Cuploadfile%5CJCo%20Tutorial-1.pdf
    http://www.sapgenie.com/sapgenie/docs/SAP%20Connectors.doc
    BADI
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    Regards,
    Laxmi.
    Edited by: Laxmi on Mar 14, 2008 6:24 PM

  • Printing Polish from Unicode ECC system

    Hi,
    to print Polish characters as SAPscript, ABAP-list or SmartForms from a ECC 6.0 already converted in Unicode, is it right way cascading fonts, SAPWIN, SAPSprint, ecc. ?
    Or... can I use "classic" HPLJ4000 device type with access method D?
    My ECC system:
    SAP_ABA     700     0014
    SAP_BASIS     700     0014
    PI_BASIS     2006_1_700     0004
    ST-PI     2008_1_700     0001
    SAP_BW     700     0016
    SAP_AP     700     0012
    SAP_APPL     600     0012
    SAP_HR     600     0022
    EA-IPPE     400     0011
    EA-APPL     600     0011
    EA-DFPS     600     0011
    EA-FINSERV     600     0011
    EA-GLTRADE     600     0011
    EA-HR     600     0022
    EA-PS     600     0011
    EA-RETAIL     600     0011
    FINBASIS     600     0011
    ECC-DIMP     600     0011
    ERECRUIT     600     0011
    FI-CA     600     0011
    FI-CAX     600     0011
    INSURANCE     600     0011
    IS-CWM     600     0011
    IS-H     600     0012
    IS-M     600     0011
    IS-OIL     600     0011
    IS-PS-CA     600     0011
    IS-UT     600     0011
    LSOFE     600     0011
    SEM-BW     600     0011
    ST-A/PI     01L_ECC600     0000
    Kernel Patch number : 227
    Thank you.
    Regards.

    Hi,
    you can use
    1) standard device type I2HP4 (for polish only - does not work, if you e.g. have mixed data e.g. from Western and Eastern europe)
    2) standard device type I2SWIN (for polish only - does not work, if you e.g. have mixed data e.g. from Western and Eastern europe)
    3) HPUTF8 or LEXUTF8 (you will need specific Unicode capable printers for these device types)
    4) Cascading Fonts as outlined in SAP note 812821 (mainly if you want to print data from multiple old code pages)
    5) Check SAP note 1097990 for your printer vendor - whether Eastern European data is supported.
    Usually, point 1. and / or  2. is the easiest way to print latin-2 data.
    Best regards,
    Nils Buerckel
    SAP AG

  • Query regerding Sapscript : Calling abap subroutines

    Hello everybody
    Hope everyone is doing fine.
    I've a small query. Whenever we require to call an abap subroutine from an abap sapscript we do the same using PERFORM statement. The syntax for the same is as below:
    PERFORM SUBROUTINE_NAME IN PROGRAM PROGRAM_NAME
    USING &VARAIABLE&
    CHANGING &VARAIABLE&
    ENDPERFORM
    Here we are passing the varaiables to the subroutine and getting back values in varaibles. In the actual program we then read values from in_tab and out_tab having structures similar to itcsy.
    The above mentioned is as per my understanding. My query is as follows:
    If in the above statement instead of passing varaibles abnd getting back variables can be pass/get back an internal table?
    I had read somewhere that it is possible using structures. If anyone is aware of how to do the same can you please give me the syntax. Actually how to get value from subroutine into an internal table. What will be the structure? Will it be same as itcsy?
    Thanks a lot to everybody in advance.
    Thanks & Regards
    Kabir Radhakrishnani

    hi check this program!!!
    REPORT Z_TEST_VBBE .
    types : begin of t_vbap ,
             VBELN like vbap-VBELN,
             posnr like vbap-posnr,
             concat(18),
            end of t_vbap.
    tables : vbap .
    select-options : s_vbeln for vbap-vbeln .
    data : it_vbap type table of t_vbap ,
           wa_vbap type t_vbap.
    select vbeln posnr from vbap into table it_vbap
    where vbeln in s_vbeln .
    " group by vbeln.
    loop at it_vbap into wa_vbap .
      perform select_data using wa_vbap-vbeln
                                wa_vbap-posnr
                       changing wa_vbap-concat      .
      modify it_vbap from wa_vbap .
    endloop .
    *&      Form  select_data
    *form select_data using vbeln type vbap-vbeln
                          posnr type vbap-posnr
                          concat.
    *endform.                    " select_data
    *&      Form  select_data
    form select_data using    p_wa_vbap_vbeln
                              p_wa_vbap_posnr
                     changing p_wa_vbap_concat.
             concatenate p_wa_vbap_vbeln
                         p_wa_vbap_posnr
                    into p_wa_vbap_concat
                    separated by '|' .
    endform.                    " select_data

  • Where to do the abap sql statement in sapscript (PO)

    Hi, all.
    Hope anybody can guide me to find a solution.
    My situation now is i have to do a purchase order in SAPSCRIPT starting from a standard po. I already found out all the related details as below:
    Program           SAPFM06P
    FORM routine      ENTRY_NEU
    Form              MEDRUCK
    So, now the problem now is I have to add some more data on my print out PO. After figure out for some time, I don't know where to do my abap sql statement. Like example, I want to retriece some data from the ADRC table. I opened the standard program SAPFM06P to add in the some sql statement, but i dun know where should i add in. Bcz if we straight away put the related ADRC field in our sapscript, it is useless, right?
    Thanks in advance.

    Thanks a lot.
    So, how should i add in code in order to fetch the data frm ADRC by using that routine. Because i only the codes like below. I don't where should i start add in.
    Form entry_neu using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
           exporting
                ix_nast        = nast
                ix_screen      = ent_screen
           importing
                ex_retco       = ent_retco
                ex_nast        = l_nast
                doc            = l_doc
           changing
                cx_druvo       = l_druvo
                cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
           exporting
                ix_nast        = l_nast
                ix_druvo       = l_druvo
                doc            = l_doc
                ix_screen      = ent_screen
                ix_from_memory = l_from_memory
                ix_toa_dara    = toa_dara
                ix_arc_params  = arc_params
                ix_fonam       = tnapr-fonam          "HW 214570
           importing
                ex_retco       = ent_retco.
    endform.
    Or i come wrong place to add in any coding. Plz guide me.
    Thanks in advance.

  • ABAP in SapScript : syntax, data types, ... ?

    Hello,
    Can someone tell me what are the biggest differences between regular ABAP and ABAP in SapScript? Like syntax rules, possible data types, and so on.
    Thanks!

    Ok, thanks for the answers.
    Just one more question
    Is it then also possible to create a SmartForm form (or Adobe Form) from within SapScript? I am looking for a workaround solution for correspondence in Training and Event Management. Only SapScript forms are possible, but if it is possible to create other forms with ABAP code in the SapScript, it could work, I think?

  • Unbelievable ABAP oddity - SapScript related

    Sappers,
    I have officially come across the oddest ABAP problem that I have seen in 8 years.  I've spent 8+ hours trying every possible code variation to get around it but nothing works.
    Here's the story in summary.
    We have an invoice with shipping fields NAME1, NAME2, NAME3, and NAME4.  Under certain circumstances we need NAME1 to use a different field.
    Our user-exit has worked perfectly since 2000 and is now acting odd after an upgrade to ERP6. 
    If I print a specific invoice, I get (using example data)
    COMPANY NAME
    123 STREET ADDRESS
    CITY NAME  ST  99999-0000
    In the user exit the field NAME1 = 'COMPANY NAME'.  I need it to say 'ALTERNATE COMPANY NAME' which resides in table ADRC.  No problem, I pull that data into a variable and then overlay want is in the NAME1 var with what it in the ALT_NAME1 var so that NAME1 now says 'ALTERNATE COMPANY'.  Great, no problems.
    Here's the weird part.  I don't expect you to believe me right off but please understand that I have gone through literally 50+ iterations to find out how to get around this behavior.
    Printing the invoice ...  I get.
    123 STREET ADDRESS
    CITY NAME  ST  99999-0000
    Whoops.  Where did ALTERNATE COMPANY go?  Let's try setting NAME1 to a hard-coded value like 'XXXXXXXXXX'.
    Printing the invoice ...  I get.
    XXXXXXXXXXX
    123 STREET ADDRESS
    CITY NAME  ST  99999-0000
    Ok, we know the data element is getting through so why is the value 'ALTERNATE COMPANY' not making it to the form?  Let's try this...
    Rather than use the value of 'ALTERNATE COMPANY' that came in from ADRC instead I hard code NAME1 = 'ALTERNATE COMPANY'.  A literal.
    Printing the invoice ...  I get.
    ALTERNATE COMPANY
    123 STREET ADDRESS
    CITY NAME  ST  99999-0000
    What the?!  It prints the value when I hard code the value but not when the same value comes from the database?  True.  I have tried every manner of manipulation on the NAME1 variable with no change in the behavior.
    Here's a really odd behavior.
    CONCATENATE 'X' NAME1 'Y' INTO NAME1.
    At this point NAME1's value is 'XALTERNATE COMPANYY'.
    Printing the invoice ...  I get ... believe it ...
    XY
    123 STREET ADDRESS
    CITY NAME  ST  99999-0000
    If I compare the value 'ALTERNATE COMPANY' that came from ADRC against a varaible with the literal 'ALTERNATE COMPANY' they are the same length and the hex codes are exactly the same as they should be.  How in the name of all that is pure and good can ABAP print XY when the variable contains 'XALTERNATE COMPANYY'  ?!  Is this some kind of cruel unicode joke?
    << Removed >>
    Thanks all,
    Crew
    Edited by: Rob Burbank on Apr 16, 2009 2:59 PM

    My SapScript experience is not deep so I'm just going to show you the code from the invoice form.
    /*  ENDIF.                                                         
    /:  ADDRESS DELIVERY PARAGRAPH ZD                                  
    /*    TITLE    &VBDKR-ANRED_WE&                                    
    /:    NAME     &VBDKR-NAME1_WE&, &VBDKR-NAME2_WE&, &VBDKR-NAME3_WE&,
    /:    STREET   &VBDKR-STRAS_WE&                                    
    /:    POSTCODE &VBDKR-PSTLZ_WE&                                    
    /:    CITY     &VBDKR-ORT01_WE&, &VBDKR-ORT02_WE&                  
    /:    REGION   &VBDKR-REGIO_WE&                                    
    /:    COUNTRY  &VBDKR-LAND1_WE&                                    
    /:    FROMCOUNTRY &VBDKR-SLAND&                                    
    /:  ENDADDRESS                                                     
    The variables I'm working with in the user-exit are eventually dumped into some print program's VBDKR structure.  &VBDKR-NAME1_WE& is the field that I am affecting from the user-exit.  I have full control of that field from the user exit as descibed in my post.  If I poke in 'XXX' then 'XXX' makes it to &VBDKR-NAME1_WE& and prints.  If I poke in the value that came from a database (verfied to be present) then &VBDKR-NAME1_WE& prints nothing.  See my comment about concatenating a literal to the front and back of the database value.  Only the literals X and Y print from that whole string.  Something is definitely amiss.
    Thanks,
    Crew

  • Printing sapscript form out of ABAP report

    Hello,
    I was wondering if there is a way to trigger the print output of a sapscript form out of an ABAP report? Maybe some kind of function module?
    Thanks
    Anne

    Hi Anne,
    The Only way is that..
    1 .You need to pass the necesary data to see the output... (WRITE_FORM)
    2. To pass the data you need to open the form... (OPEN_FORM)
    3. After all you need to close the form... (CLOSE_FORM)
    If you follow these three you can call you sap script from anywhere,, example you can write these in  FM's (SE37).
    From interface programs as well...
    but you need open, write, close the forms to run a Sap script.
    Thanks & regards,
    Dileep .C

  • SAPSCRIPT FROM ABAP

    Hi,
    I have a requirement to output a sapscript document from data held entirely in a Z table. The document will
    have header and item format. Does anyone have a skeleton ABAP / or steps required to achieve this. My guess is:
    1. Create Sapscript document
    2. within ABAP fill internal tables with data to be printed
    3. call sapscript function modules passing data to be printed.
    Also ( rough estimate! ),  would this be achievable in a day? There is an existing sapscript which could be used as a template - then modify to read Z data.
    Thanks for your help.
    Calum

    Hi,
    Go to se72.
    give a name to script.
    give the paragraph and character formats.
    design the layout for header and main window.
    then activate.
    Now write the logic for ur script forms in se38 using
    open_form, close_form,write_form.
    Refer this link.
    The complete introduction of sapscripts is given in it.
    http://www.thespot4sap.com/articles/SAPscript_Introduction.asp
    These are the standard programs try to understand them and u will come to know how to create
    ur form.
    RSTXFCAT  -  Program to find out SAP Scirpt names (Search Program)
    RSTXCDM1 -  SAPscript: Sample Program for Form Printing
    RSTXCNVR -   Converting SAPscript standard text to RAW format (ASCII)
    RSTXCPDF   -  Routines for Converting OTF Format to PDF Format
    RSTXDBUG   - Activate/Deactivate Form Debugger
    RSTXFCAT    - Find Forms
    RSTXFCPY    - Copy Forms Between Clients
    RSTXFCOM  - Comparison of Two Forms
    RSTXFCON   - SAPscript: Conversion of Page Format for Forms
    RSTXFINF     - Comprehensive Information about a Specific Form
    RSTXHTML   - Conversion of SAPscript Texts (ITF) to HTML
    RSTXICON    - List of SAP icons and their names and SAP numbers <xxxxx>
    RSTXSYMB   - List of SAP symbols and their names as well as <xxxxx> SAP number
    RSTXR3TR     - Transport Program For SAPscript Transport Objects
    RSTXSCAT    - Find Styles
    RSTXSF01     - TrueType font installation for SAPscript/SmartForms
    RSTXTCAT    - Find Standard Texts

  • SAPScript, BDCs(SAP-ABAP)

    Hi Friends,
        Could you please send me one good example of Print Program, script form layout and one conversion program(BDC) using standard batch input method.
    Please treat it as urgent.
    Useful answers ontime will be rewarded.
    Please send the reply on following id - [email protected]
    Thx and Regards,
    bobby

    Hi,
    Check these links
    Introduction
    http://www.thespot4sap.com/articles/SAPscript_Introduction.asp
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
    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
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    Sample BDC
    report ZABSALES_ORDER no standard page heading line-size 255.
    TABLES: vbak, vbap.
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK salesblock WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : Order_ty LIKE vbak-auart DEFAULT 'OR'
    modif id SC1,
    Customer LIKE kuagv-kunnr OBLIGATORY VALUE CHECK,
    Purchase LIKE vbkd-bstkd OBLIGATORY VALUE CHECK,
    Material LIKE vbap-matnr OBLIGATORY VALUE CHECK,
    Quantity LIKE rv45a-kwmeng OBLIGATORY VALUE CHECK.
    SELECTION-SCREEN END OF BLOCK salesblock.
    SELECTION-SCREEN END OF SCREEN 500.
    CALL SELECTION-SCREEN 500.
    *At selection-screen on Order_ty.
    *IF Order_ty 'OR'.
    MESSAGE E080(ZVIKALP).
    ENDIF.
    start-of-selection.
    perform bdc_dynpro using 'SAPMV45A' '0101'.
    perform bdc_field using 'BDC_CURSOR'
    'VBAK-AUART'.
    perform bdc_field using 'BDC_OKCODE'
    '=UER1'.
    perform bdc_field using 'VBAK-AUART'
    Order_ty.
    perform bdc_dynpro using 'SAPMV45A' '4001'.
    perform bdc_field using 'BDC_OKCODE'
    '=SICH'.
    perform bdc_field using 'VBKD-BSTKD'
    Purchase.
    perform bdc_field using 'KUAGV-KUNNR'
    Customer.
    perform bdc_dynpro using 'SAPMSSY0' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    '04/05'.
    perform bdc_field using 'BDC_OKCODE'
    'SICH'.
    perform bdc_field using 'RV45A-KETDAT'
    '06-05-2005'.
    perform bdc_field using 'RV45A-KPRGBZ'
    'D'.
    perform bdc_field using 'VBKD-PRSDT'
    '05-29-2005'.
    perform bdc_field using 'BDC_CURSOR'
    'RV45A-KWMENG(01)'.
    perform bdc_field using 'RV45A-MABNR(01)'
    Material.
    perform bdc_field using 'RV45A-KWMENG(01)'
    Quantity.
    perform bdc_dynpro using 'SAPLSPO2' '0101'.
    perform bdc_field using 'BDC_OKCODE'
    '=OPT1'.
    CALL TRANSACTION 'VA01' USING bdcdata
    MODE 'N'
    UPDATE 'A'
    MESSAGES INTO messtab.
    loop at messtab.
    if messtab-msgtyp = 'S'.
    FORMAT COLOR 5.
    elseif messtab-msgtyp = 'E'.
    FORMAT COLOR 6.
    ENDIF.
    write: / messtab-msgtyp, messtab-msgnr.
    endloop.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'SC1'.
    screen-input = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Start new screen *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR BDCDATA.
    BDCDATA-PROGRAM = PROGRAM.
    BDCDATA-DYNPRO = DYNPRO.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    ENDFORM.
    Insert field *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL ' '.
    CLEAR BDCDATA.
    BDCDATA-FNAM = FNAM.
    BDCDATA-FVAL = FVAL.
    APPEND BDCDATA.
    ENDIF.
    ENDFORM.
    ***********By session method
    report ZAB_PURCHASE no standard page heading line-size 255.
    tables: ekko, ekpo, t100.
    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF T_MSG OCCURS 0.
    INCLUDE STRUCTURE T100.
    DATA: END OF T_MSG.
    *include bdcrecx1.
    *SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK salesblock WITH FRAME TITLE text-001.
    PARAMETERS : Vendor like Ekko-lifnr OBLIGATORY,
    Order_ty like RM06E-BSART obligatory,
    Pur_org like ekko-ekorg obligatory value check,
    Pur_grp like ekko-ekgrp obligatory value check,
    Material like ekpo-ematn obligatory value check,
    Quantity(13) type n,
    Plant like ekpo-werks obligatory value check.
    SELECTION-SCREEN END OF BLOCK salesblock.
    *SELECTION-SCREEN END OF SCREEN 500.
    *CALL SELECTION-SCREEN 500.
    TOP-OF-PAGE.
    WRITE :/40 'Creating Purchase Order' COLOR 4 INTENSIFIED ON INVERSE ON
    ULINE.
    FORMAT COLOR 7 INVERSE ON.
    WRITE :/1(20) 'Mesaage Type',
    25(20) 'Message'.
    ULINE.
    start-of-selection.
    *perform open_group.
    perform bdc_dynpro using 'SAPMM06E' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'EKKO-EKGRP'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'EKKO-LIFNR'
    Vendor.
    perform bdc_field using 'RM06E-BSART'
    Order_ty.
    perform bdc_field using 'RM06E-BEDAT'
    '05-30-2005'.
    perform bdc_field using 'EKKO-EKORG'
    Pur_org.
    perform bdc_field using 'EKKO-EKGRP'
    Pur_grp.
    perform bdc_field using 'RM06E-LPEIN'
    'T'.
    perform bdc_dynpro using 'SAPMM06E' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'EKPO-WERKS(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'EKPO-EMATN(01)'
    Material.
    perform bdc_field using 'EKPO-MENGE(01)'
    Quantity.
    perform bdc_field using 'EKPO-WERKS(01)'
    Plant.
    *perform bdc_transaction using 'ME21'.
    *CALL TRANSACTION 'ME21' USING BDCDATA
    MODE 'A'
    UPDATE 'A'
    MESSAGES INTO MESSTAB.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    DEST = FILLER8
    GROUP = 'ZAP3'
    HOLDDATE = FILLER8
    KEEP = 'X'
    USER = SY-UNAME
    RECORD = FILLER1
    IMPORTING
    QID =
    EXCEPTIONS
    CLIENT_INVALID = 1
    DESTINATION_INVALID = 2
    GROUP_INVALID = 3
    GROUP_IS_LOCKED = 4
    HOLDDATE_INVALID = 5
    INTERNAL_ERROR = 6
    QUEUE_ERROR = 7
    RUNNING = 8
    SYSTEM_LOCK_ERROR = 9
    USER_INVALID = 10
    OTHERS = 11
    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 'BDC_INSERT'
    EXPORTING
    TCODE = 'ME21'
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    TABLES
    dynprotab = BDCDATA
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7
    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 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 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.
    end-of-selection.
    loop at messtab.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    ID = messtab-MSGID
    LANG = 'EN'
    NO = messtab-msgnr
    V1 = messtab-MSGV1
    V2 = messtab-MSGV2
    V3 = messtab-MSGV3
    V4 = messtab-MSGV4
    IMPORTING
    MSG = T_MSG
    EXCEPTIONS
    NOT_FOUND = 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.
    if messtab-msgtyp = 'S'.
    FORMAT COLOR 5 inverse on.
    elseif messtab-msgtyp = 'E'.
    FORMAT COLOR 6 inverse on.
    else.
    FORMAT COLOR 3 inverse on.
    ENDIF.
    WRITE : /1(20) messtab-msgtyp ,
    25(60) t_msg.
    endloop.
    *perform close_group.
    Start new screen *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR BDCDATA.
    BDCDATA-PROGRAM = PROGRAM.
    BDCDATA-DYNPRO = DYNPRO.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    ENDFORM.
    Insert field *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL ' '.
    CLEAR BDCDATA.
    BDCDATA-FNAM = FNAM.
    BDCDATA-FVAL = FVAL.
    APPEND BDCDATA.
    ENDIF.
    ENDFORM.
    Regards,
    Satish

  • Problem in calling ABAP Subroutine from SAPSCRIPT

    Hi,
    I need to get the reason for cancellation of a Business Even in Training & Event Management module, so I am passing Emp_id.
    But the reason(CAAATRT) is returned with blank by the code.
    please help.
    /:DEFINE &EMP_ID&= &PPVAR-TOBJD&
    /:PERFORM HR_REASON_PRINT IN PROGRAM ZHR_REASON_PRINT
    /:USING &EMP_ID&
    /:CHANGING &CAATRT&
    REPORT  ZHR_REASON_PRINT.
    DATA : BEGIN OF in_par OCCURS 10.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF in_par.
    DATA : BEGIN OF out_par OCCURS 0.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF out_par.
    DATA:   TOBJD TYPE PPVAR-TOBJD,
            ADATANR TYPE HRP1001-ADATANR,
            CAATR TYPE HRPAD25-CAATR,
            CAATRT TYPE T77CART-CAATRT,
            EMP_ID TYPE C.
    TABLES     : PPVAR,
             HRP1001,
             HRPAD25,
             T77CART.
    FORM HR_REASON_PRINT TABLES input output.
    in_par[] = input[].
    out_par[] = output[].
    READ TABLE in_par INDEX 1.
    CHECK sy-subrc = 0.
    TOBJD = in_par-value.
    MOVE in_par-value TO TOBJD.
    SELECT ADATANR
    into ADATANR
    FROM HRP1001
    WHERE OBJID EQ TOBJD.
    ENDSELECT.
    SELECT CAATR
    into CAATR
    FROM HRPAD25
    WHERE ADATANR EQ ADATANR.
    ENDSELECT.
    SELECT CAATRT
    INTO CAATRT
    FROM T77CART
    WHERE CAATR EQ CAATR.
    ENDSELECT.
    REFRESH out_par.
      out_par-name = 'DREASON'.
      move CAATRT To out_par-value.
      MODIFY out_par INDEX 1.
    APPEND out_par.
      output[] = out_par[].
    Thanks
    Ramakrishna

    Hi ramakrishna,
    1. while calling subroutines from sapscripts,
    there is a special technique,
    which has got its own limitations.
    2.
    FORM abc
    TABLES
    in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    ENDFORM.
    3. The perform in se38 program should be of the
    above format only.
    4. We cannot pass internal tables.
    5. Rather we need to pass
    VARIABLE NAME
    VARIABLE VALUE
    (see the structure of itcsy in se11)
    6. In this form, we have to read
    the internal table in_tab
    to capture the variable name and its value.
    7. Similary, to return the values,
    we have to put one record (for each variable)
    in out_tab.
    regards,
    amit m.

  • Execute ABAP code from within SAPScript code

    http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm

    Hi
    Do u have any question??? or are you trying to give suggestion???
    If u have query how to call a report in script here is ur answer
    The Form :
    /:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    ZKRPMM_PERFORM_Z1MEDRUCK.
    DATA : BEGIN OF it_input_table OCCURS 10.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    * déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
    * w_vbeln LIKE vbak-vbeln,
    w_zcdffa LIKE vbak-zcdffa.
    * FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = w_ebeln
    IMPORTING
    output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.
    Reward all helpfull anwers
    Regards
    Pavan

Maybe you are looking for

  • Dynamic path in the communication channel

    Hi, Is it possible to provide the path into the receiver file communication channel via the mapping program or any other means? In short, we want the path in the channel to be dynamic. Is it possible?, if so, how? Thanks, John

  • Compress and rollup the cube

    Hi Experts, do we have to compress and then rollup the aggregates? what whappends if we rollup before compression of the cube Raj

  • Multiple MRP areas to be handled with MD04

    Hello to all, my scope is to advice the user in MD04 when there are other MRP-Areas for the same material in the same plant and maybe offer a function to jump there directly. I am looking for suggestions how to solve this, maybe one of you did it alr

  • J2EE Tutorial Bookstore application

    Hello, New to J2EE. I have followed all instructions to deply the bookstore application, or at least I think that I have. When I try to launch from the admin tool, I get the following page: HTTP Status 503 - This application is not currently availabl

  • Trying to update!

    When I'm trying to update Adobe Photoshop 13.0.5 it gives me this error message below. I don't know what to do, can you offer some help? Extension Manager 6.0.5 Update Installation failed. Error Code: U44M1P7 Adobe Photoshop 13.0.5 Done with Errors.