Where we using Standard Symbols in Script?

Hi,
           What is standard Symbol where we using Standard symbol?
With regards,
Thiru.*

Hi
A variable in SAPscript is called a symbol. There are the following types.
• System symbol (e.g. the number of the current page)
• Standard symbol (usable in any document)
• Program symbol (value from the print program)
• Text symbol (“local variable”)
The value of a symbol is text for using within SAPscript code and is represented by the symbol-name enclosed by ampersands. On seeing the tell-tale ampersands in SAPscript code, you sometimes need to figure out the symbol type.
goto any PAGEWINDOW's Text elements in Script (SE71)
from the Menu-> INSERT-> Symbols
you find all symbols here
System symbols
System symbols in a SAPscript form are comparable to system fields like SY-UZEIT in an ABAP program, and include these. The graphical editor offers three types of system symbol.
1. General system symbols
See the table TTSXY. PAGE is the most widely used. The list given in our BC460 training manuals is out of date.
2. SAPscript system symbols
See the dictionary structure SAPSCRIPT. SAPSCRIPT-FORMPAGES is the most widely used.
3. ABAP system symbols
For the ABAP system field SY-UNAME, say, the symbol is SYST-UNAME. [SYST is the dictionary structure for ABAP system fields.]
Sample code:
User: &SYST-UNAME&
Page &PAGE& of &SAPSCRIPT-FORMPAGES(C3)&
Standard symbols
Standard symbols are maintained centrally (in the table TTDTG via transaction SE75) for use in any document. Menu path:
Tools
Form Printout
Administration
Settings
Some standard symbols are SAP-standard and others are custom. Curiously, table TTDTG is cross-client although SAPscript forms are not.
The value of a standard symbol has to be defined for each language used. This gives a way to make a single SAPscript form multi-lingual.
We can take advantage to an extent of the central maintenance, though there is no guarantee that the available standard symbols will used in every appropriate context.
Standard symbols complicate searching a SAPscript form, since text like ‘Charity registration 211581’ may be hiding in a standard symbol.
Text symbols
A text symbol is declared and assigned to within the SAPscript code, and so obviously applies only to the current document. The command DEFINE is used, requiring /: in the tag column, as in the following examples.
/: DEFINE &COMP_NAME& = ‘University of Warwick’
/: DEFINE &WS_RATE& = &TAX_SUMM_C&
SCRIPT COMMANDS
ADDRESS : Formatting of Address
BOTTOM, ENDBOTTOM : Define Footer text in a window
BOX, POSITION, SIZE : Boxes, Lines and Shading
CASE, ENDCASE : Case Distinction
DEFINE : Value assignment to text symbols
HEX, ENDHEX : Hexadecimal values
IF, ENDIF : Conditional text output
INCLUDE : Include other texts
NEW-PAGE : Explicit forms feed
NEW-WINDOW : Next window main
PRINT-CONTROL : Insert print control character
PROTECT...ENDPROTECT : Protect from page break
RESET : Initialize outline paragraphs
SET COUNTRY : Country-specific formating
SET DATE MASK : Formating of date fields
SET SIGN : Position of +/- sign
SET TIME MASK : Formating of time fields
STYLE : Change style
SUMMING : Summing variables
TOP : Set header text in window MAIN
Regards
Anji

Similar Messages

  • Using Standard text in scripts

    Hi all,
    I had a problem while printing standard texts in scripts.
    I Know how to print standard text if we have to print it from the begining of window using
    INCLUDE &T024E-TXADR& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS& PAR
    But my problem id i have print it after a hard coded text like
    Delivery schedule: 'here i have to print the standard text'.
    can any one please help me out how to solve the problem
    Thanks & regards
    sreehari p

    Hi,
    Here's one my brother taught me - you can actually trick the system to accommodate this requirement.
    Ensure that you use 2 different paragraph formats in your INCLUDE statement, using the PARAGRAPH and NEW_PARAGRAPH clauses, ie.
    INCLUDE &T024E-TXADR& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS& PARAGRAPH P1 NEW-PARAGRAPH P2
    Paragraph P2 (which will be used as the first line) should be created as having a Line Spacing value of 1 TW (1 twip) which is less than 1/1000th of an inch.  Also, set the Left Margin value to an offset which brings the text to the right of the Delivery schedule literal.
    Paragraph P1 (which will be used for all subsequent lines) should be set up as normal - ie. use the same paragraph format as that for displaying your "Delivery schedule:" literal.  If you need the text to be indented in line with the first line, then copy your existing paragraph to a new paragraph but set the Left Margin value to the same as that in P2.
    What this does is to output the first line of text indented by the margin after skipping 1 twip, giving the illusion that it's actually on the same line.  Since subsequent lines are output with a normal (or normal/indented) paragraph, that just follows with normal spacing on subsequent lines.
    Hope this makes sense.
    Regards,  Andy

  • Text symbol in script

    Hi All,
    I am using a standard symbol in script.Insert>symbol>standard symbol,whether these symbols are speific to the program or will be available globally.i meant to ask if i use a standard symbole 'cp_prod' can i use the same in another form for different text?
    Regards,
    Sai

    Hi
    These script symbols are global
    you can use them in other form also
    A variable in SAPscript is called a symbol. There are the following types.
    • System symbol (e.g. the number of the current page)
    • Standard symbol (usable in any document)
    • Program symbol (value from the print program)
    • Text symbol (“local variable”)
    The value of a symbol is text for using within SAPscript code and is represented by the symbol-name enclosed by ampersands. On seeing the tell-tale ampersands in SAPscript code, you sometimes need to figure out the symbol type.
    goto any PAGEWINDOW's Text elements in Script (SE71)
    from the Menu-> INSERT-> Symbols
    you find all symbols here
    System symbols
    System symbols in a SAPscript form are comparable to system fields like SY-UZEIT in an ABAP program, and include these. The graphical editor offers three types of system symbol.
    1. General system symbols
    See the table TTSXY. PAGE is the most widely used. The list given in our BC460 training manuals is out of date.
    2. SAPscript system symbols
    See the dictionary structure SAPSCRIPT. SAPSCRIPT-FORMPAGES is the most widely used.
    3. ABAP system symbols
    For the ABAP system field SY-UNAME, say, the symbol is SYST-UNAME. [SYST is the dictionary structure for ABAP system fields.]
    Sample code:
    User: &SYST-UNAME&
    Page &PAGE& of &SAPSCRIPT-FORMPAGES(C3)&
    Standard symbols
    Standard symbols are maintained centrally (in the table TTDTG via transaction SE75) for use in any document. Menu path:
    Tools
    Form Printout
    Administration
    Settings
    Some standard symbols are SAP-standard and others are custom. Curiously, table TTDTG is cross-client although SAPscript forms are not.
    The value of a standard symbol has to be defined for each language used. This gives a way to make a single SAPscript form multi-lingual.
    We can take advantage to an extent of the central maintenance, though there is no guarantee that the available standard symbols will used in every appropriate context.
    Standard symbols complicate searching a SAPscript form, since text like ‘Charity registration 211581’ may be hiding in a standard symbol.
    Text symbols
    A text symbol is declared and assigned to within the SAPscript code, and so obviously applies only to the current document. The command DEFINE is used, requiring /: in the tag column, as in the following examples.
    /: DEFINE &COMP_NAME& = ‘University of Warwick’
    /: DEFINE &WS_RATE& = &TAX_SUMM_C&
    Reward points for useful Answers
    Regards
    Anji

  • My toolbar is missing and there is a button where it used to be that says "Please re-install the Toolbar" but when I click on it nothing happens? Also when I start Firefox I get a script running error how do I solve these issues?

    My toolbar is missing and there is a button at the top left that asks me to "Please re-install the Toolbar" but when I click on it nothing happens???
    Then when I start Mozilla I get a long delay before it launches and a script running error "A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    Script: chrome://tavgp/content/libs/include.js:595"
    How do I solve these issues???

    No idea - and you provide no clues
    what version of iPHoto do you have? Of the OS? is the iPhoto icon you are speaking of in the Dock?
    re-read your post and try to provide information using standard Mac terms since we can not see you or your computer and only have your worrds to let us try to help you
    Somehow my "IPhoto" icon now says "Preview".  When I click on "Preview" nothing opens up except the bar says Preview.  When I click on the Preview on the bar, a box opens up with different items, except when I click on any of them, there is nothing there.  The only thing that work is the "quit preview".  However, it is still there where my IPhoto icon should be.  I can't get into my IPhoto.  How do I get rid of this "Preview" and how did it end up taking over the IPhoto icon???
    If you go to your Applications folder and double click on iPhoto what happen?
    LN

  • Where can we find the standard program for scripts and smartform for vl02

    where can we find the standard program for scripts and smartform for vl02
    regard,
    anil

    If it is a standard Script Output see that all config in NACE tcode was done correctly and in the Application document the output type was properly defined and attached to a medium, partner and all communication related things like printer name, when to print the output and number of messages etc are entered in the document
    the go to the related application Tcode
    (for sales order goto VA02 or VA03)
    (delivery -VL02N or VL03N)
    for Invoice VF02 or VF03
    for PO -goto ME9F
    enter doc number, Issue Output to -> screen/printer
    then see the output
    step 1 : copy the z layout into testing client thru SCC1.
    step2 : go to se71 and check modified layout.
    step3 : if it is under logistics.. go to TCODE "NACE".
    u will see various applictions for each business process.
    there u have configure ur related layout according to requirments,
    for example u consider for Request fo Quatation..
    there is APPLICATION called "EA"
    click and enter into it. configure it with ur requirments, for help consult with ur functonal consaltant, and save it.
    step 4 : goto tcode ME9A for requst for quatation(RFQ).
    step 5 : enter test data avalable and check it with message display.
    it is same for other applications like Contract agreament --> ME9k
    invoice --> vl02n
    and goes on..
    Reward points for useful Answers

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

  • Where we can use standard ODS Object and Trasactional ODS Object ?

    Where we can use standard ODS Object and Trasactional ODS Object ?

    Hi,
    In a standard ODS object, data is stored in different versions (active, delta, modified), whereas a transactional ODS object contains the data in a single version.  Therefore, data is stored in precisely the same form in which it was written to the transactional ODS object by the application. In BW, you can use a transaction ODS object as a data target for an analysis process. The transactional ODS object is also required by diverse applications, such as SAP Strategic Enterprise Management (SEM) for example, as well as other external applications.Transactional ODS objects allow data to be available quickly. The data from this kind of ODS object is accessed transactionally, that is, data is written to the ODS object (possibly by several users at the same time) and reread as soon as possible.
    It offers no replacement for the standard ODS object. Instead, an additional function displays those that can be used for special applications.
    Regards,
    R.Ravi

  • Where can I find the Tables script that are used in the Documentation

    Hello All,
    Where can I find the Tables script that are used in the Documentation, Like Sales, Customers, employee, department.......
    Appreciate any Help
    Thanks & Regards
    Madhu K

    10g
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/scripts.htm#sthref77
    9i
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96539/scripts.htm#4216

  • Problem using standard spa script form

    hi all,
          can anyone help me on this issue i have a problem with using standard form name,the standard form name is J_1I_57F4 and program name is J_1I57FPN.in
    standard form name when you go to main window you will find element as item_values. under that there are field names . so instead of "&J_1IINDCUS-J_1ISUBRAT(C)&" i have to add field which shows 16.4 percent of "&J_1IEXCDTL-EXBAS(C)& ". so how can we write this please check this out and let me know if there is anything to do and how to do it.how can we define it in form and how to write the subroutines for that and perform it in form.please help me out.

    u need to copy both the program and script in Z.
    after that attach that zprogram and script in ur standard transaction from the SPRO or NACE transaction....
    reward points if useful....

  • Problem in using standard text in SAP Script

    Hi All,
    I have to replace English text hardcoded in a script with standard texts (SO10) in Spanish. When I am including the standard text in script, it is displayed in different font and bigger size. I want to reduce the size and change the font of standard text. Is there any way to do that?
    Thanks in advance
    Radhika
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 4, 2010 2:37 PM

    Please check the links below , which might hel you..
    Re: Setting font to standard text in sap script
    How to change stranded text font in script
    Regards
    Satish Boguda

  • Where do I find symbols to use in correspondence

    where do I find symbols on firefox i.e." umlaut" etc.

    Hi nelis134,
    You should take a look at this article:
    http://www.forlang.wsu.edu/help/keyboards1.asp
    It will show you how to create international characters in Windows if you en_US keyboard.
    Hopefully this helps!

  • Problem using standard libraries in C++ class

    Hi
    I am new to JNI. I am having problems using standard C++ library.
    My java code looks like
    public class JavaSide {
    public native void sayHello();
    static {
    System.loadLibrary("NativeSideImpl");
    public static void main(String[] args) {
    JavaSide app = new JavaSide();
    app.sayHello();
    and My NativeSideImpl.cpp code is
    #include <stdio.h>
    #include "JavaSide.h"
    JNIEXPORT void JNICALL Java_JavaSide_sayHello
    (JNIEnv *env, jobject obj)
    cout<<" Hello";
    I am compiling this on solaris 5.8 using the following command
    CC -G -Kpic -I/usr/java/include -I/usr/java/include/solaris NativeSideImpl.cpp -o libNativeSideImpl.so
    when I run my java program using
    java JavaSide
    I get the following exception
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/oracle/temp/libhello.so: ld.so.1: java: fatal: relocation error: file /home/oracle/temp/libhello.so: symbol __1cDstdEcout_: referenced symbol not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:832)
    at HelloWorld.<clinit>(HelloWorld.java:6)
    The program works if I replace cout with printf() .
    My LD_LIBRARY_PATH does include the path where of the C++ standard libraries.
    Any help would be much appreciated
    Thanks in advance..

    Well, cout was just a a simple example. I was having problems with using the std C++ libraries, e.g ostringstream . and likes .
    I tried using the -lCstd in the compile option and it worked.

  • Standard text in scripts

    Once we create standard text using SO10 transaction, how to use it in the script, I mean, where should we write??

    Hi,
    You will have to use a INCLUDE statement for the same.
    /: INCLUDE 'Z..' OBJECT TEXT PARAMETER...
    Take a look at this thread ...
    Re: Query Regarding INCLUDE statement in SAP Script
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • How to use field-symbols in MODIFY ... TRANSPORTING and SORT

    Hi,
    I need to increase the performance of an abap report using the field-symbols. More exactly  the code is the following.
    TYPES:
      BEGIN OF itab_structure.
         INCLUDE STRUCTURE nameofstructure.
      TYPES:
         RECNO   LIKE sy-tabix,
      END OF itab_structure.
    DATA:
      itab TYPE STANDARD TABLE OF  itab_structure
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    SORT itab ASCENDING BY f1.
    LOOP AT itab WHERE f1 = '10'.
        itab-fn= value-n.
    MODIFY itab
                 TRANSPORTING  fx fy fz ft     
                        WHERE  f1   = c1_filed AND
                                      f2   = c2_field.
    ENDLOOP.
    I need your suggestions in this kind of conversion or solution.
    SORT itab ASCENDING BY f1 (<-- I don't know if in this case the better performances should be obtained using field symbols and in which way)
    FIELD-SYMBOLS: <fs_itab_line> TYPE LINE OF itab.
    LOOP AT itab ASSIGNING <fs_itab_line> WHERE
    <fs_itab_line>-f1 = '10'.
    MODIFY itab 
                 TRANSPORTING  fx fy fz ft     
                        WHERE  f1   = c1_filed AND
                                      f2   = c2_field.
    (I don't know if in this case the better performances should be obtained using field symbols and in which way)
    ENDLOOP.
    I wish to implement the field symbols or the better performance in terms of execution time in all my abap code, where it is possible.
    Any suggestion will be well appreciated.
    Thanks in advance for your kind support.
    Regards,
           Giovanni

    Dear All,
    I have appeciated your suggestions and I can conclude these points in my case:
    1) The "sort" statement is not optimized in a different way using filed-symbols
    2) The loop with "where" condition on a standard table is performed using filed-symbols
    But ... my last point to investigate is about the statement MODIFY table TRANSPORTING f1, f2 WHERE conditions.
    More exactly, in my code the execution logic of the abap code expects a global modification of the same table at the end of every (primary) loop, using the MODYFY statement.
    In other words in my code I can locate two loops on the same table in the following logic:
    LOOP AT table1 WHERE f1 = '10'. (#1)
          updates to table1
          set c1_filed, c2_filed
          LOOP AT table1.   (#2)            
             IF f1 = c1_filed AND
                f2 = c2_filed.
               table1-fx = 'x'.
               table1-fy = 'y'.
               table1-fz = 'z'.
               table1-ft = 't'.   
             ENDIF.                 
             MODIFY table1.            
          ENDLOOP.   (#2)              
    ENDLOOP.   (#1)
    In better way (maybe more fast in terms of execution time) to modify a set of lines (MODIFY...TRANSPORTING...WHERE):
    LOOP AT table1 WHERE f1 = '10'.
       table1-fx= 'x'.
       table1-fy= 'y'.
       table1-fz= 'z'.
       table1-ft= 't'.
       MODIFY itab
          TRANSPORTING fx fy fz ft
       WHERE f1 = c1_filed AND
             f2 = c2_field.
    ENDLOOP.
    My aim is to use field-symbols everywhere possible for speeding up the execution of my code,by maintaining this logic.
    My proposal should be the following but I need your kind opinion.
    FIELD-SYMBOLS: <fs_#1_line> TYPE LINE OF table1.
    FIELD-SYMBOLS: <fs_#2_line> TYPE LINE OF table1.
    LOOP AT table1 WHERE f1 = '10' ASSIGNING <fs_#1_line>. (#1)
          updates to table1
          set c1_filed, c2_filed
          LOOP AT table1 ASSIGNING <fs_#2_line>.  (#2)            
             IF <fs_#2_line>-f1 = c1_filed AND
                <fs_#2_line>-f2 = c2_filed.
               <fs_#2_line>-fx = 'x'.
               <fs_#2_line>-fy = 'y'.
               <fs_#2_line>-fz = 'z'.
               <fs_#2_line>-ft = 't'.   
             ENDIF.                 
          ENDLOOP.   (#2)              
    ENDLOOP.   (#1)
    Your kind support is very important for me.
    Thanks in advance.
    Regards,
         Giovanni

  • Why do we use Feild Symbols

    Hi All
    Breifly explain me why do we use field symbols. and how to use them and where to use them.
    Thanks! in advance

    Hi,
    The new style of definition of internal tables usually doesn't include a header area for the internal table. Furthermore, ABAP Objects will not allow internal tables with header lines. For added performance, instead of declaring a work area--use a field symbol. The work area concept and header line format both require data to be moved from the internal table to the work area or header area. A field symbol is just a pointer that will point to the proper line of the itab. With field symbols, no data needs to be moved. The field symbol just stores the proper memory address to point at the right line. The field symbol can have structure and be made up of fields similar to a work area or header line. Because no data needs to be copied, processing is much faster.
    The keys to the usage are:
    1) Defining the table records and the field symbol in a similar type.
    just an ordinary standard table
    TYPES: BEGIN OF it_vbak_line,
    vbeln LIKE vbak-vbeln,
    vkorg LIKE vbak-vkorg,
    vtweg LIKE vbak-vtweg,
    spart LIKE vbak-spart,
    kunnr LIKE vbak-kunnr,
    END OF it_vbak_line.
    DATA: it_vbak TYPE TABLE OF it_vbak_line.
    FIELD-SYMBOLS: <it_vbak_line> TYPE it_vbak_line.
    or as a screaming fast hash table for keyed reads
    TYPES: BEGIN OF it_vbpa_line,
    vbeln LIKE vbak-vbeln,
    kunnr LIKE vbak-kunnr,
    END OF it_vbpa_line.
    DATA: it_vbpa TYPE HASHED TABLE OF it_vbpa_line
    WITH UNIQUE KEY vbeln.
    FIELD-SYMBOLS: <it_vbpa_line> TYPE it_vbpa_line.
    2) In ITAB processing, utilize the ASSIGNING command.
    loop example
    LOOP AT it_vbak ASSIGNING <it_vbak_line>.
    look at records--populate it_zpartner
    read example
    READ TABLE it_vbpa ASSIGNING <it_vbpa_line>
    WITH TABLE KEY vbeln = <it_vbak_line>-vbeln.
    3) Refer to the field symbol's fields in the loop or after the read.
    wa_zpartner-vkorg = <it_vbak_line>-vkorg.
    wa_zpartner-vtweg = <it_vbak_line>-vtweg.
    wa_zpartner-spart = <it_vbak_line>-spart.
    wa_zpartner-kunag = <it_vbak_line>-kunnr.
    wa_zpartner-kunwe = <it_vbpa_line>-kunnr.
    See the code example below for further detail. The code was written in R/3 4.6C and should work for all 4.x versions.
    Code
    REPORT z_cnv_zshipto_from_hist          NO STANDARD PAGE HEADING
                                            LINE-SIZE 132
                                            LINE-COUNT 65
                                            MESSAGE-ID z1.
    Program Name: ZSHIPTO from History             Creation: 07/23/2003  *
    SAP Name    : Z_CNV_ZSHIPTO_FROM_HIST           Application: SD      *
    Author      : James Vander Heyden               Type: 1              *
    Description :  This program reads tables VBAK & VBPA and populates   *
    ZPARTNER. ZPARTNER table is read in by ZINTSC06. ZINTSC06 updates    *
    the ZSHIPTO relationships.                                           *
    Inputs:  Selection Screen                                            *
    Outputs:                                                             *
    External Routines                                                    *
      Function Modules:                                                  *
      Transactions    :                                                  *
      Programs        :                                                  *
    Return Codes:                                                        *
    Ammendments:                                                         *
       Programmer        Date     Req. #            Action               *
    ================  ==========  ======  ===============================*
    J Vander Heyden   07/23/2003  PCR     Initial Build                  *
    DATA DICTIONARY TABLES                                               *
    TABLES:
      zpartner.
    SELECTION SCREEN LAYOUT                                              *
    PARAMETERS: p_load   RADIOBUTTON GROUP a1 DEFAULT 'X',
                p_deltab  RADIOBUTTON GROUP a1.
    SELECTION-SCREEN SKIP 2.
    SELECT-OPTIONS: s_vkorg  FOR zpartner-vkorg MEMORY ID vko OBLIGATORY
                                 NO INTERVALS NO-EXTENSION,
                    s_vtweg  FOR zpartner-vtweg MEMORY ID vtw OBLIGATORY
                                 NO INTERVALS NO-EXTENSION,
                    s_spart  FOR zpartner-spart MEMORY ID spa OBLIGATORY
                                 NO INTERVALS NO-EXTENSION.
    INTERNAL TABLES                                                      *
    TYPES: BEGIN OF it_vbak_line,
            vbeln LIKE vbak-vbeln,
            vkorg LIKE vbak-vkorg,
            vtweg LIKE vbak-vtweg,
            spart LIKE vbak-spart,
            kunnr LIKE vbak-kunnr,
          END OF it_vbak_line.
    DATA: it_vbak TYPE TABLE OF it_vbak_line.
    FIELD-SYMBOLS: <it_vbak_line>  TYPE it_vbak_line.
    TYPES: BEGIN OF it_vbpa_line,
            vbeln LIKE vbak-vbeln,
            kunnr LIKE vbak-kunnr,
          END OF it_vbpa_line.
    DATA: it_vbpa TYPE HASHED TABLE OF it_vbpa_line
                       WITH UNIQUE KEY vbeln.
    FIELD-SYMBOLS: <it_vbpa_line>  TYPE it_vbpa_line.
    DATA: it_zpartner TYPE TABLE OF zpartner.
    DATA: wa_zpartner TYPE zpartner.
    STRUCTURES                                                           *
    VARIABLES                                                            *
    DATA:  z_mode   VALUE 'N',
           z_commit TYPE i,
           z_good   TYPE i,
           z_bad    TYPE i.
    CONSTANTS                                                            *
    SELECTION-SCREEN HELP                                                *
    INITIALIZATION                                                       *
    INITIALIZATION.
    AT LINE SELECTION                                                    *
    AT LINE-SELECTION.
    AT SELECTION SCREEN                                                  *
    AT SELECTION-SCREEN.
    START-OF-SELECTION                                                   *
    START-OF-SELECTION.
      IF p_load = 'X'.
        PERFORM select_records.
        PERFORM process_itab.
      ELSE.
        PERFORM delete_table.
      ENDIF.
    END-OF-SELECTION                                                     *
    END-OF-SELECTION.
    *&      Form  DELETE_TABLE
          text
    FORM delete_table.
      DATA:  w_answer.
      CLEAR: w_answer.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
           EXPORTING
                titlebar              = text-002
            DIAGNOSE_OBJECT       = ' '
                text_question         = text-003
                text_button_1         = text-004
                icon_button_1         = 'ICON_OKAY'
                text_button_2         = text-005
                icon_button_2         = 'ICON_CANCEL'
                default_button        = '2'
                display_cancel_button = ''
            USERDEFINED_F1_HELP   = ' '
            START_COLUMN          = 25
            START_ROW             = 6
            POPUP_TYPE            =
          IMPORTING
               answer                = w_answer.
       TABLES
            PARAMETER             =
       EXCEPTIONS
            TEXT_NOT_FOUND        = 1
            OTHERS                = 2
      IF w_answer = 1.
        DELETE FROM zpartner
       WHERE vkorg IN s_vkorg
         AND vtweg IN s_vtweg
         AND spart IN s_spart.
        MESSAGE i398(00) WITH 'Records deleted from table: '
                              sy-dbcnt
      ENDIF.
    ENDFORM.                    " DELETE_TABLE
    *&      Form  SELECT_RECORDS
          text
    FORM select_records.
    get vbaks
      CLEAR: it_vbak.
      SELECT vbeln vkorg vtweg spart kunnr
        FROM vbak
        INTO CORRESPONDING FIELDS OF TABLE it_vbak
       WHERE vkorg IN s_vkorg
         AND vtweg IN s_vtweg
         AND spart IN s_spart
         AND auart = 'TA'.
    get vbpa we's
      CLEAR: it_vbpa.
      SELECT *
        FROM vbpa
        INTO CORRESPONDING FIELDS OF TABLE it_vbpa
        FOR ALL ENTRIES IN it_vbak
       WHERE vbeln = it_vbak-vbeln
         AND posnr = '000000'
         AND parvw = 'WE'.
    ENDFORM.                    " SELECT_RECORDS
    *&      Form  PROCESS_ITAB
    attempt post goods issue for all entries.
    FORM process_itab.
      LOOP AT it_vbak ASSIGNING <it_vbak_line>.
    look at records--populate it_zpartner
        READ TABLE it_vbpa ASSIGNING <it_vbpa_line>
                    WITH TABLE KEY  vbeln   = <it_vbak_line>-vbeln.
        IF sy-subrc = 0.
          CLEAR: wa_zpartner.
          wa_zpartner-mandt = sy-mandt.
          wa_zpartner-vkorg = <it_vbak_line>-vkorg.
          wa_zpartner-vtweg = <it_vbak_line>-vtweg.
          wa_zpartner-spart = <it_vbak_line>-spart.
          wa_zpartner-kunag = <it_vbak_line>-kunnr.
          wa_zpartner-kunwe = <it_vbpa_line>-kunnr.
          APPEND wa_zpartner TO it_zpartner.
        ENDIF.
      ENDLOOP.
      SORT it_zpartner BY mandt vkorg vtweg spart kunag kunwe..
      DELETE ADJACENT DUPLICATES FROM it_zpartner.
    do a mass table update.
      INSERT zpartner FROM TABLE it_zpartner.
      IF sy-subrc = 0.
        MESSAGE s398(00) WITH 'Inserted records: ' sy-dbcnt.
      ENDIF.
    ENDFORM.                    " PROCESS_ITAB
    reward if helpful,
    kushagra

Maybe you are looking for

  • Query Tuning-Help Needed

    Hi , 11.2.0.1 AIX 6.1 I have following query which is executed from Application,the query comes back within 2 secs for not so common last_name combined with gender but it is taking longer time for common last_names like 'BROWN' or 'JONES' or 'SMITH'

  • Ipod doesn't play Songs..please help

    I got a brand spankin new 30 gb black Video iPod and it is beautiful....but it doesnt play anything... its all there, it just doesnt play....Ive tried taking everything off then putting it on..reinstalling itunes---nothing works If anyone can help th

  • Win 8.1 enterprise skype crashes when i try to use...

    hello all, i have just installed skype from the windows app store and when i try to video(switch camera on) it tries then it locks up the system and have  to reboot. i have to uninstall and try again several time and no good tried several new web cam

  • Why is the "Choose File" button disabled when trying to add a photo to my account?

    I have an iPad 1 and when I try to add a photo to my profile the "Choose File" button is disabled although I can choose a different Avatar. I suppose I could log in using my phone and try but that would defeat the purpose :-)

  • PRE 9 - Why can I not use flv formats in it?

    There seems to be a fix or plug-in for every other version of PRE.  Why can't these fixes be used for PRE 9 - surely Adobe knows people want to use this format for editing - they let you load up to this format so why not include an editing function..