Macro in ECC 6.0

Hi ALL,
i have one problem in ECC 6.0 while upgrading 4.6 to ECC 6.0.
In 4.6 macro is defined as: DEFINE ++.
But in ECC 6.0 it's giving an error " In Unicode programs, the "+" character cannot appear in names".
Could anybody please tell me how to correct this error?
Thanks & Regards.
srinivas

Hi Raghavender,
  This macro is in standard program.i have copied into z_ program and i am checking how to handle this one.
So please tell me how to do it.
Thanks & Regards,
Srinivas.

Similar Messages

  • Setting up SNP with ECC at a macro level

    Hello experts
    What are the different scenarios that can be set up with SNP - ECC - SNP with respect to Distribution planning ?
    Meaning stock transfers , assuming PPDS will be active and will only be used for creating PPDS planned orders.
    We have 10 plants and 34 DC's and regional DC's.
    Thank you.
    Regards
    KK

    HI KK
    This is more an architecture question that has to be addressed at macro level.
    Assuming your demand is coming from DP or somewhere outside, a SNP run either SNP Heuristics or CTM or optimizer could be setup to move that demand from DCs to Plants. Then you run the planing runs at each plant in PPDS producing planned orders in short term and SNP run for medium to long term. If you have external procurement, the system creates purchase reqs.
    If your plants are sourcing your DCs and then to regional DCs, you may want to run this in 3 stages, first SNP from regional DC to DC, then DC to plant and finally at Plant.
    At one of our projects, we separated the SNP runs into Heuristic( where these is no capacity issue) and some into CTM ( where there are more constraints).
    Based on the scenario, you may choose to integrate these planed orders, purchase reqs. from SNP/PPDS to ECC and execute there.
    You may also run a deployment run from the plants to DCs and not integrate these deployment reqs. with ECC ( as you would not execute them yet), then finally convert these deployment reqs. into STOs/POs and then push these to ECC for execution.
    There are infact so many possibilities based your business need. You may take above as a frame work. Hope this helps.

  • SAP ECC S&OP Macro for this requirement

    Hi there,
    I am doing flexible planning in S&OP and as a result maintained a row to calculate the actual inventory cost. The S&OP is done at Product Group level with many FERT in it per group. So when I do my S&OP plan I want to be able to calculate the members together standard cost from material master and do a sum total of it.
    For example:
    PRODUCT GROUP: PG1 has
    MAT 1 - 25%
    MAT 2 - 25%
    MAT 3 - 25%
    MAT 4 - 25%
    MATERIAL MASTER: St.Cost
    MAT 1 - $1.5
    MAT 2 - $2.5
    MAT 3 - $1.0
    MAT 4 - $2.0
    S&OP forecast for PG1 = 100 units ( which eventually passes 25% each to its members during dis-aggregation )
    MAT 1 - 25 units
    MAT 2 - 25 units
    MAT 3 - 25 units
    MAT 4 - 25 units
    So, when the macro runs for this product group inventory calculation, I would want the output to be 25(1.5) + 25(2.5) + 25(1.0) + 25(2.0)
    Any advise ?
    Thank you

    Any one, thoughts? thanks

  • HR Programming in ECC 6.0

    From what I read in SAP Help,logical databases are placed under obsolete features but are retained for older releases. Does this mean HR programming using PNP and macros are not encouraged in ECC 6.0? If so, what are the alternatives? Is there a solution in ABAP Objects specifically for coding with HR and payroll?

    Hi,
    In general ABAP reporting LDB's become obsolete, But in HR programming still they(PNP like) are used frequently without any problem.
    As far as I know we have to use CLUSTERS and IMPORT EXPORT cluster for Payroll programming. No objects for the Payroll.
    reward if useful.
    regards,
    Anji

  • Call Transaction from Excel VBA macro and download ALV list object results

    I have a situation that must be very common u2013 but I canu2019t find any clear information on how to get it done! 
    We frequently run SAP transactions, download the results (orders or inventory) into Excel, do some calculations and create a spreadsheet report. 
    I would like to automate this process using Excel VBA so that a macro will perform these steps:
    1. Run our custom SAP report "YSD033" that summarizes orders using the previous day as the [From Date] parameter.  (The user already has an active ECC 6 R3 session running.)   If possible, can the TC be run using a specific variant "G111BIZ" ?
    2. Download the list object that appears in an ALV grid as a table to an empty spreadsheet in the active workbook (export XXL list object)
    3. Save the resulting workbook and close Excel.
    Should the solution use u201Ccall transactionu201D or a GuiXT script?
    Any help would be much appreciated, and some sample VBA code would be great!
    Thanks.
    Glenn

    Good suggestion, but
    I get "permission denied" for   SapGuiAuto.GetScriptingEngine
    I also tried the method below, but received this RFC error message:
    User PPPPPPP  has no RFC authorization for function group SYST.
    Sub LoginCheck()
    If login = False Then
        ' Setting the necessary variables for R/3 connection
        Set objBAPICortrol = CreateObject("SAP.Functions")
        Set objConnection = objBAPICortrol.Connection
        ' Establish a connection
    If objConnection.Logon(0, False) Then
        login = True
        MsgBox "Connection Established"
        CommandButton1.Caption = "Disconnect"
    End If
    Else
        CommandButton1.Caption = "Connect 2 SAP"
        login = False
        objConnection.Logoff
        Set objConnection = Nothing
        Set objBAPICortrol = Nothing
    End If
    End Sub
    I was told that these kinds of authority open up too big of a window that can't be monitored adequately...
    I'm considering an approach like what is below if I can't convince security to grant me permissions...
        Application.Wait Now + TimeValue("00:00:01")
        SendKeys EnterKey, False
    Since blocked RFC security settings are preventing the solution from being installed, I am markgin this question as answered. 
    I will post different questions about 1. how to convince the security team that it will be safe to allow the use of RFC calls, and /or 2. how use some windows-level scripting code to run the SAP jobs.
    Thanks.
    Edited by: GlennWebster on Mar 1, 2010 4:34 PM

  • PU19 Form Problem Caused By Diff between 470 & ECC 6.0

    In 470 when you you generated the SUI Wage Reporting form/report it came out in a regular report format generated by an ABAP Write statement.  This version was easy to save as a TXT file and then use EXCEL to read the TXT file and massage it.  In ECC 6.0 this report is now in PDF format and my user wants the ability to do the same thing, but so far I haven't found a solution.  You can save a PDF file as TXT, but you get all the formatting from your PDF and it would require way to much work to try and reformat it into something useable. You can still click on SYSTEM-LIST-SAVE, but all the choices are greyed out.  Does anybody have any idea on how to solve this problem?

    I'm not sure if you still need this or if your user has gotten used to the new way of doing things, but if you extend the validity date of the form you used to output in table T5UX7, you should be able to produce the older version of the wage list.  You can get to the table via the IMG: Payroll > Payroll USA > Tax Reporter > Tax Form Definition > PDF Based Forms > Define Validity Dates and Form Parameters.
    Something else that we've done in the past for our users was to download the TemSe file into Excel and create a macro to parse and filter on the EE detail records.
    Hope this helps!
    Ann

  • UCCE 7.5.7 CAD macro to populate ICM Call Variable

    UCCE 7.5.7
    CAD 7.5.8
    I need to create a CAD Toolbar macro in Cisco Desktop Administrator that reads data from a text file (an 8 digit number) and writes this data to an ICM Call Variable.
    The 8 digit number is not known until after the call is answered. 
    I have created a Toolbar Task that asks the CAD Agent to enter digits, which are then written to a text file on the local PC, but I haven't been able to create a macro successfully that will copy the data from the text file and write this to an ICM Call Variable.
    Anyone done this before or know how to?
    Thanks,
    Neil

    The layout logic works pretty much the way it is described in the CAD documentation. Double check the naming of your ECC variable id 252. What did you name your ecc variable in ICM? What did you name it in CAD? Remember in CAD the name should not include the "user" prefix. Make sure you are writing the correct layout name into variable 252, this needs to exactly match the name of your layout in CAD.
    For database reads you may want to look into the dblookup functionality in ICM. It's somewhat limited with what you can do but easy to setup if it works for you. Otherwise you could use the database querying abilities of CVP or IP-IVR. If none of those are suitable then you can go with some custom integration triggered by a CAD client desktop workflow.

  • Create Attachment in workflow through ABAP Class in ECC 5.0

    Hi,
    Wr are using SAP ECC 5.0 and i am trying to create attachment through ABAP class.
    Here in ECC 5.0, macro INCLUDE cntn01_swc is not available.
    I am getting an error in declaration of SOFM object, because again SWC0_OBJECT is not available.
    I've tried creating the parameter as type SOFM and of type table of SOFM but it also not working.
    Can anybody help me how i can create SOFM instance in ABAP class in ECC 5.0?
    Regards,
    Smit

    Hi
    I am not very much sure about ECC 5.0 environment. Firstly are you looking to create a SOFM object inside any class or program or Function module , If yes then you need to include a include INCLUDE CNTN01_SWC (No arrow brackets) if this include is not available then use INCLUDE<CNTN01>  then declare a variable of type SWC0_OBJECT if you are using first include or declare of type SWC_OBJECT.
    Once you include any of the includes then by making use of SWC macros you can create a object
    SWC0_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for first include.
    SWC_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for second include.
    Regards
    Pavan

  • Technical Requirements for SD in ECC 6.0

    Hi All,
        I need to document the technical requirements in ECC 6.0 implementation for SD Module.Kindly revert back with helpful answers.
    Thanks,
    Faisal

    As per my understanding you require information on what Technical document might be required to be prepared by SD Consultant. If my understanding is correct, in that case we require to prepare Functional Specs for the enhncement & development required in the project.
    Functional Specs:
    To speak at macro level that is at project manager or at senior levels. The Functional Spec (Specification) which is a comprehensive document is created after the (SRS) Software Requirements Document. It provides more details on selected items originally described in the Software Requirements Template. Elsewhere organizations combine these two documents into a single document.
    The Functional Specification describes the features of the desired functionality. It describes the product's features as seen by the stake holders, and contains the technical information and the data needed for the design and development.
    The Functional Specification defines what the functionality will be of a particular area that is to be precise a transaction in SAP terminology.
    The Functional Specification document to create a detailed design document that explains in detail how the software will be designed and developed.
    The functional specification translates the Software Requirements template into a technical description which
    a) Ensures that the product feature requirements are correctly understood before moving into the next step that is technical development process.
    b) Clearly and unambiguously provides all the information necessary for the technical consultants to develop the objects.
    At the consultant level the functional specs are prepared by functional consultants on any functionality for the purpose of getting the same functionality designed by the technical people as most of the times the functionalities according to the requirements of the clients are not available on ready made basis.
    Let me throw some light on documentation which is prepared before and in a project:
    1) Templates
    2) Heat Analysis -
    3) Fit Gap or Gap Analysis
    4) Business Process Design
    5) Business Process Model
    6) Business Change & Impact
    7) Configuration Design, which is just 5 % of Total SAP- have different names -
    8) Future Impact & Change Assessment
    9) Functional Design (Module Wise)
    10) Risk Assessment
    11) Process Metrics and Many More-- Which has impact on Business and its work flow
    Regards,
    Rajesh Banka

  • Macro to restrict the users to adjust keyfigure in planning book

    HI,
    My Planning book is using by all the managers, where i need to restrict a keyfigure to enter manually for few users.
    Only for 3 users the keyfigure has to open, when they are in planning book, and all other users should not have any access to  enter manually any voulmes in the planning book.
    i tried framing a macro, but not successfull.
    Is it really Macro required to make this? or any other way that we can make this?
    if it is a macro can u brief,me  how to proceed for the macro.
    Thanks in Advance
    Arun R Y

    I know this is not the forum for this question.
    There are APO alerts that use APO transaction /SAPAPO/AMON1 - Alert Monitor.
    Can this alert monitor be configured to show up in the universal worklist (UWL) in the portal?
    if so would these alerts show up in the alert inbox of the uwl just as other sap ECC alerts do?
    (the other alerts i speak of are those referenced here (http://help.sap.com/saphelp_nw04s/helpdata/en/3f/81023cfa699508e10000000a11402f/frameset.htm).
    Or are these alerts two totally different types of SAP functionality with the same name (ALERT) ?
    Thanks
    Ted Smith

  • FACING PROBLEM IN macro

    Hi Experts,
                   i am facing a problem while upgrading a 4.6c to ecc 6.1program. its a macro program. after checking unicode a error is coming like.IN TEXT MODE THE ENCODING ADDITION MUST BE SPECIFIED.
    DEFINE m_open.
          FORM F_DSOPEN_&1_&2                                           *
          This is a macro to dynamically open unix files                *
    -->  dsn                                                           *
    -->  type                                                          *
    -->  c                                                             *
    form f_dsopen_&1_&2 using
            p_xpath.
      data msg(80).
      open dataset p_xpath for &1 in &2 mode message msg.
      if sy-subrc <> 0.
        message e135(fr) with p_xpath msg.
      endif.
    endform.
    END-OF-DEFINITION.
    m_open input  text.----
    ERROR.
    m_open input  binary.
    m_open output text.
    m_open output binary.
    PLEASE TELL ME HOW CAN I RESOLVE IT.
    Thanks & Regards
    Pankaj Acharya

    Hi,
    Here is an excerpt from sap documentation.
    ... TEXT MODE ENCODING {DEFAULT|UTF-8|NON-UNICODE}
    Effect:
    The addition IN TEXT MODE opens the file as a text file. The addition ENCODING defines how the characters are represented in the text file. When writing in a text file, the content of a data object is converted to the representation entered after ENCODING, and transferred to the file. If the data type is character-type and flat, trailing blanks are cut off. In the data type string, trailing blanks are not cut off. The end-of-line marking of the relevant platform is applied to the transferred data by default. When reading from a text file, the content of the file is read until the next end-of-line marking, converted from the format specified after ENCODING into the current character format, and transferred to a data object.
    The end-of-line marking depends on the operating system of the application server. In the MS Windows operating systems, the markings "CRLF" and " LF" are possible, while under Unix, only "LF" is used. If, when using Windows, an existing file is opened without the TYPE addition (see os_addition), the first end-of-line marking is found and used for the whole file. If a new file is created without the TYPE addition, the content of the profile parameter abap/NTfmode is used. If the profile parameter is not set, "CRLF" is used. If a file with the TYPE addition is opened and a valid value is contained in attr, this value is used.
    In Unicode programs, only the content of character-type data objects can be transferred to text files and read from text files. The addition ENCODING must be specified in Unicode programs, and can only be omitted in non-Unicode programs.
    The additions after ENCODING determine in which character representation the content of the file is handled.
    DEFAULT
    In a Unicode system, the designation DEFAULT corresponds to the designation UTF-8, and the designation NON-UNICODE in a non-Unicode system.
    UTF-8
    The characters in the file are handled according to the Unicode character representation UTF-8.
    NON-UNICODE
    In a non-Unicode system, the data is read or written without being converted. In a Unicode system,the characters in the file are handled according to the non-Unicode-codepage that would be assigned to the current text environment according to the database table TCP0C, at the time of reading or writing in a non-Unicode system.
    If the addition ENCODING is not specified in non-Unicode programs, the addition NON-UNICODE is used implicitly.
    ... LEGACY TEXT MODE [{BIG|LITTLE} ENDIAN] [CODE PAGE cp]
    Effect:
    Opening a Legacyfile. The addition IN LEGACY TEXT MODE opens the file as a legacy text file. As with legacy binary files, the byte order and the codepage with which the content of the file should be handled can also be specified. The syntax and meaning of {BIG|LITTLE} ENDIAN and CODE PAGE cp are the same as for legacy binary files.
    In contrast to legacy binary files, the trailing blanks in a legacy file are cut off when writing character-type flat data objects in a legacy text file. As for a text file, an end-of-line marking is also applied to the transferred data. In contrast to text files opened with the addition INTEXT MODE, Unicode programs do not check whether the data objects used for reading or writing are character-type. Furthermore, the LENGTH additions of the statements READ DATASET and TRANSFER are used for counting in bytes in legacy text files and in the units of a character represented in the memory for text files.
    Note:
    As with legacy binary files, text files that have been written in a non-Unicode system can be accessed in Unicode systems as legacy text files, and the content is converted accordingly.
    Example
    A file test.dat is created as a text file, filled with data, changed, and exported. As every TRANSFER statement applies end-of-line marking to written content, after the change, the content of the file has two lines. The first line contains "12ABCD". The second line contains "890". The character "7" has been overwritten by the end-of-line marking of the first line.
    DATA: file TYPE string VALUE `test.dat`,
    result TYPE string.
    OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    TRANSFER `1234567890` TO file.
    CLOSE DATASET file.
    OPEN DATASET file FOR UPDATE IN TEXT MODE ENCODING DEFAULT
    AT POSITION 2.
    TRANSFER `ABCD` TO file.
    CLOSE DATASET file.
    OPEN DATASET file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    WHILE sy-subrc = 0.
    READ DATASET file INTO result.
    WRITE / result.
    ENDWHILE.
    CLOSE DATASET file.
    regards,
    Omkar.

  • How to debug abap macros?

    Hi,
    Can anyone tell me How to debug abap macros?
    Thanks in advance.
    -Selva

    Hi Rigel,
    Understand it is a very old thread, but still could you please help me out with this? I tried to search for the option which you mentioned, but to no avail. I have SAP ECC 7.0.
    Thanks in advance.

  • Converting ECC to 4.6c version

    Hi friends,
        I have a requirement where we need to downgrade the smartform which is in ECC5.0 into 4.6 version. I was trying to do it manually by looking at the ECC one but I find quite a few things which are different. Most imp thing is the table. When I create a table node I am not able to see 3 subnodes (main, header, footer) automatically in 4,6. Is there any other way to directly conver ecc to 4.6 ? or we need to do it manually only ?
    Please suggest.
    Thanks in advance.
    Reddy

    I found one program and which will download and upload the smartform.
    Note : i did not test it and i am not sure how it works.
    ZSMART FORM UPLOAD DOWNLOAD
    De SAP ABAP en castellano
    Saltar a navegación, búsqueda
    REPORT zquality LINE-SIZE 150 NO STANDARD PAGE HEADING.
    *Program : ZSMART_FORM_UPLOAD_DOWNLOAD *
    *Description : This utility/tool can download or upload smartform and *
    smartstyles. *
    *=================================================
    =====================*
    Abhishek is not responsible for any damages caused by the use or *
    misuse of this program and can not provide any warranty with this *
    program. Use it entirely at your own risk. *
    Incase you don't remember the key or your key has expired, Please *
    drop me a mail at [email protected] with your installation number. A *
    new key will be allocated to you. *
    *=================================================
    =====================*
    CHANGE LOG *
    | Date | Ver | Name | Description |
    *|----
    |----
    |----
    |----
    |*
    | 30.04.2003| VER 1.01 | ABHISHEK | Created |
    | 30.01.2004| VER 1.02 | ABHISHEK | Modified |
    | 09.02.2004| VER 2.00 | ABHISHEK | Modified (Released) |
    | | | | |
    *&===== TABLES =====
    TABLES: stxfadm,
            stxsadm.
    DATA: v_pass,
    g_ans,
    v_abhi(16),
    g_ins00(14) VALUE ' ',
    BEGIN OF tab OCCURS 0,
    line(72),
    END OF tab,
    tname LIKE sy-repid.
    *&===== SELCTION SCREEN =====
    SELECTION-SCREEN BEGIN OF BLOCK smart1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-101.
    PARAMETERS: p_fname LIKE stxfadm-formname DEFAULT 'ZTEST2'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-102.
    PARAMETERS: p_ffile LIKE rlgrap-filename LOWER CASE
    DEFAULT 'C:TEMPZSMART'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK ind1 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-103.
    PARAMETERS: p_ft RADIOBUTTON GROUP abh1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-104.
    PARAMETERS: p_fu RADIOBUTTON GROUP abh1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-105.
    PARAMETERS: p_fd RADIOBUTTON GROUP abh1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK ind1.
    SELECTION-SCREEN END OF BLOCK smart1.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK smart2 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-106.
    PARAMETERS: p_sname LIKE stxfadm-formname DEFAULT 'ZTEST2'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-102.
    PARAMETERS: p_sfile LIKE rlgrap-filename LOWER CASE
    DEFAULT 'C:TEMPZSMART'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK ind2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-103.
    PARAMETERS: p_st RADIOBUTTON GROUP abh2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-104.
    PARAMETERS: p_su RADIOBUTTON GROUP abh2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 4(20) text-105.
    PARAMETERS: p_sd RADIOBUTTON GROUP abh2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK ind2.
    SELECTION-SCREEN END OF BLOCK smart2.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK abhi WITH FRAME TITLE text-004.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) text-107.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(15) text-108.
    PARAMETERS: p_key(8).
    SELECTION-SCREEN COMMENT 30(16) text-109.
    PARAMETERS: p_ins(14).
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK abhi.
    *&===== AT-SELCTION-SCREEN BEFOR OUTPUT =====
    AT SELECTION-SCREEN OUTPUT.
      PERFORM sub_installation.
      PERFORM sub_get_set_para.
      PERFORM sub_pass.
    *&===== AT-SELCTION-SCREEN =====
    AT SELECTION-SCREEN.
      CLEAR v_pass.
      PERFORM set_para.
      PERFORM sub_validation.
    *&===== MACRO =====
      DEFINE checkabap.
        data: begin of l_tab occurs 0,
        line(72),
        end of l_tab,
        l_lines like sy-index.
        read report sy-repid into l_tab.
        describe table l_tab lines l_lines.
        if l_lines <> 0 .
          vmess ' Program has been modifid externally !!'.
        endif.
      END-OF-DEFINITION.
      DEFINE vmess.
        if v_pass = space.
          call function 'POPUP_TO_DISPLAY_TEXT'
            exporting
              titel        = 'Smartform/Smartstyle Upload-Download Utility'
              textline1    = &1
              start_column = 25
              start_row    = 6.
          v_pass = 'X'.
        endif.
      END-OF-DEFINITION.
      DEFINE abhishek.
        tab-line = &1.
        translate tab-line using v_abhi.
        append tab.
        clear tab.
      END-OF-DEFINITION.
      DEFINE app.
        itab-id = &1. itab-key = &2. itab-entry = &3.
        append itab.
        clear itab.
      END-OF-DEFINITION.
    *&===== START-SELCTION-SCREEN =====
    START-OF-SELECTION.
      IF v_pass = space.
        PERFORM sub_warning.
        IF g_ans = '1'.
          REFRESH tab. CLEAR tab.
          abhishek: 'report ztabhi.'.
          PERFORM form1000000.
          GENERATE SUBROUTINE POOL tab NAME tname.
          IF sy-subrc = 0.
            PERFORM sub_000005
            IN PROGRAM (tname) USING p_key v_abhi g_ins00 IF FOUND .
          ELSE.
            vmess 'Error!! Trying to copy this Utility, Please install'.
          ENDIF.
          REFRESH tab. CLEAR: tab, tname.
          abhishek: 'report ztabhi.'.
          PERFORM form100000.
          PERFORM form100001.
          PERFORM form100002.
          PERFORM form100003.
          PERFORM form100004.
          PERFORM form100005.
          GENERATE SUBROUTINE POOL tab NAME tname.
          IF sy-subrc = 0.
            SET PARAMETER ID 'ABH1' FIELD p_key.
            IF p_fu = 'X'.
              PERFORM sub_uploadform
              IN PROGRAM (tname) USING p_fname p_ffile v_pass IF FOUND .
            ELSEIF p_fd = 'X'.
              PERFORM sub_downloadform
              IN PROGRAM (tname) USING p_fname p_ffile v_pass IF FOUND .
            ENDIF.
            IF p_su = 'X'.
              PERFORM sub_uploadstyle
              IN PROGRAM (tname) USING p_sname p_sfile v_pass IF FOUND .
            ELSEIF p_sd = 'X'.
              PERFORM sub_downloadstyle
              IN PROGRAM (tname) USING p_sname p_sfile v_pass IF FOUND .
            ENDIF.
          ELSE.
            vmess 'ERROR: Either the key is wrong or Program has been
    modified'.
          ENDIF.
        ELSE.
          vmess 'Action Cancelled'.
        ENDIF.
      ENDIF.
    *& Form form1000000
    FORM form1000000.
      abhishek:
      'FORM SUB_000005 USING P_KEY V_ABHI G_INS00. ',
      'Data: L_xyz like sy-datum,',
      ' l_check(4) .',
      'ZVABHI G_INS00.',
      'ENDFORM.'.
    ENDFORM. " form1000000
    *& Form form100001
    FORM form100001.
      abhishek:
      ' DEFINE DATADECS.',
      ' DATA: BEGIN OF T_&1 OCCURS 0.',
      ' INCLUDE STRUCTURE &1.',
      ' DATA: END OF T_&1.',
      ' SELECT * INTO TABLE T_&1 FROM &1 WHERE STYLENAME = P_?NAME.',
      ' END-OF-DEFINITION.',
      ' DEFINE DOWNLOADALL.',
      ' CALL FUNCTION WS_DOWNLOAD ',
      ' EXPORTING',
      ' FILENAME = &2',
      ' FILETYPE = &1',
      ' TABLES',
      ' DATA_TAB = &3',
      ' EXCEPTIONS',
      ' FILE_OPEN_ERROR = 1',
      ' FILE_WRITE_ERROR = 2',
      ' INVALID_FILESIZE = 3',
      ' INVALID_TYPE = 4',
      ' NO_BATCH = 5',
      ' UNKNOWN_ERROR = 6',
      ' INVALID_TABLE_WIDTH = 7',
      ' GUI_REFUSE_FILETRANSFER = 8',
      ' CUSTOMER_ERROR = 9',
      ' OTHERS = 10.',
      ' END-OF-DEFINITION.',
      ' DEFINE UPLOADALL.',
      ' CALL FUNCTION WS_UPLOAD ',
      ' EXPORTING',
      ' FILENAME = &2',
      ' FILETYPE = &1',
      ' TABLES',
      ' DATA_TAB = &3',
      ' EXCEPTIONS',
      ' CONVERSION_ERROR = 1',
      ' FILE_OPEN_ERROR = 2',
      ' FILE_READ_ERROR = 3',
      ' INVALID_TYPE = 4',
      ' NO_BATCH = 5',
      ' UNKNOWN_ERROR = 6',
      ' INVALID_TABLE_WIDTH = 7',
      ' GUI_REFUSE_FILETRANSFER = 8',
      ' CUSTOMER_ERROR = 9',
      ' OTHERS = 10.',
      ' END-OF-DEFINITION.',
      ' DEFINE ABHI_SPEC1.',
      ' DATA: BEGIN OF T_&1 .',
      ' INCLUDE STRUCTURE &1.',
      ' DATA: END OF T_&1.',
      ' CLEAR: L_CHAR, L_NO, .',
      ' L_NO = L_NO + DD03L-INTLEN.',
      ' ENDIF.',
      ' ENDSELECT.',
      ' APPEND %_%A@.',
      ' CLEAR %_%A@.',
      ' ENDLOOP.',
      ' END-OF-DEFINITION.',
      ' DEFINE VMESS.',
      ' IF V_PASS = SPACE.',
      ' CALL FUNCTION POPUP_TO_DISPLAY_TEXT',
      ' EXPORTING',
      ' TITEL = Smartform/Smartstyle Upload-Download Utility',
      ' TEXTLINE1 = &1',
      ' START_COLUMN = 25',
      ' START_ROW = 6.',
      ' V_PASS = X.',
      ' ENDIF.',
      ' END-OF-DEFINITION.'.
    ENDFORM. " form100001
    *& Form form100000
    FORM form100000.
      abhishek:
    *&===== TABLES =====
      'TABLES: STXFADM,',
      ' STXSADM,',
      ' DD03L.',
    *&===== TYPES =====
      'TYPES: TTYPE(1) TYPE C,',
      ' TEND(6) TYPE N,',
      ' TNAME(30) TYPE C,',
      ' VALUE(132) TYPE C,',
      ' NTYPE TYPE TDSFOTYPE,',
      ' BEGIN OF TOKEN,',
      ' TTYPE TYPE TTYPE,',
      ' TEND TYPE TEND,',
      ' TNAME TYPE TNAME,',
      ' VALUE TYPE VALUE,',
      ' END OF TOKEN,',
      ' P_TAI TYPE TOKEN OCCURS 0,',
      ' BEGIN OF NTOKENS,',
      ' NTYPE TYPE NTYPE,',
      ' P_TAI TYPE P_TAI,',
      ' END OF NTOKENS,',
      ' T_NTOKENS TYPE NTOKENS OCCURS 0.',
    *&===== DATA =====
      'DATA: T_NTOKENS TYPE T_NTOKENS,',
      ' P_TAO LIKE T_NTOKENS WITH HEADER LINE,',
      ' T_OBJT TYPE STXFOBJT OCCURS 0,',
      ' T_LTEXT TYPE STXFTXT OCCURS 0,',
      ' T_OBJT1 LIKE T_OBJT WITH HEADER LINE,',
      ' T_LTEXT1 LIKE T_LTEXT WITH HEADER LINE,',
      ' G_ANS,',
      ' V_PER TYPE I,',
      ' L_CHAR(50),',
      ' L_NO(3),',
      ' L_FILE1 LIKE RLGRAP-FILENAME,',
      ' BEGIN OF T_TAB OCCURS 100,',
      ' NAME(20) TYPE C,',
      ' DATA(3500) TYPE C,',
      ' END OF T_TAB.',
    *&===== FIELD-SYMBOLS =====
      'FIELD-SYMBOLS: .'.
    ENDFORM. " form100000
    *& Form form100002
    FORM form100002.
      abhishek:
      'FORM SUB_UPLOADFORM using P_#NAME p_ffile v_pass.',
      ' DATA: I_FORMNAME(30),',
      ' P_TA` LIKE P_TA^-P_TA` WITH HEADER LINE.',
      ' CLEAR: L_FILE1,',
      ' %_%A@.',
      ' REFRESH: %_%A@.',
      ' REFRESH: %_%^KE?, %_@!%, %_L%EX%, P_TA, %_^@!%1, %_L%EX%1.',
      ' CLEAR: %_%^KE?, %_@!%, %_L%EX%, P_TA, %_^@!%1, %_L%EX%1.',
      ' CONCATENATE P_fFILE ~f!o@r#m$.ABHI INTO L_FILE1.',
      ' I_FORMNAME = P_#NAME .',
      ' UPLOADALL DAT L_FILE1 %_%A@.',
      ' IF SY-SUBRC <> 0.',
      ' VMESS ERROR in Uploading: Please check the file path.',
      ' ENDIF.',
      ' LOOP AT %_%A@.',
      ' IF %_%A@-NAME = STXFOBJT.',
      ' %_^@!%1 = %_%A@-DATA.',
      ' IF %_^@!%1-FORMNAME <> SPACE.',
      ' %_^@!%1-FORMNAME = I_FORMNAME.',
      ' ENDIF.',
      ' APPEND %_^@!%1.',
      ' CLEAR %_^@!%1.',
      ' ELSEIF %_%A@-NAME = STXFTXT.',
      ' %_L%EX%1 = %_%A@-DATA.',
      ' IF %_L%EX%1-FORMNAME <> SPACE.',
      ' %_L%EX%1-FORMNAME = I_FORMNAME.',
      ' ENDIF.',
      ' APPEND %_L%EX%1.',
      ' CLEAR %_L%EX%1.',
      ' ELSEIF %_%A@-NAME = STXFADM.',
      ' STXFADM = %_%A@-DATA.',
      ' IF STXFADM-FORMNAME <> SPACE.',
      ' STXFADM-FORMNAME = P_#NAME.',
      ' STXFADM-FIRSTUSER = SY-UNAME.',
      ' STXFADM-LASTUSER = SY-UNAME.',
      ' STXFADM-DEVCLASS = $TMP.',
      ' ENDIF.',
      ' ELSE.',
      ' AT NEW NAME.',
      ' P_TA^-NTYPE = %_%A@-NAME.',
      ' REFRESH P_TA`. CLEAR P_TA`.',
      ' ENDAT.',
      ' P_TA` = %_%A@-DATA.',
      ' IF P_TA^-NTYPE =SF.',
      ' IF P_TA`-TNAME = FORMNAME.',
      ' P_TA`-VALUE = P_#NAME.',
      ' ELSEIF P_TA`-TNAME = DEVCLASS.',
      ' P_TA`-VALUE = $TMP.',
      ' ELSEIF P_TA`-TNAME = FIRSTUSER.',
      ' P_TA`-VALUE = SY-UNAME.',
      ' ELSEIF P_TA`-TNAME = FIRSTDATE.',
      ' P_TA`-VALUE = SY-DATUM.',
      ' ELSEIF P_TA`-TNAME = FIRSTTIME.',
      ' P_TA`-VALUE = SY-UZEIT.',
      ' ELSEIF P_TA`-TNAME = LASTUSER.',
      ' P_TA`-VALUE = SY-UNAME.',
      ' ELSEIF P_TA`-TNAME = LASTDATE.',
      ' P_TA`-VALUE = SY-DATUM.',
      ' ELSEIF P_TA`-TNAME = LASTTIME.',
      ' P_TA`-VALUE = SY-UZEIT.',
      ' ENDIF.',
      ' ENDIF.',
      ' APPEND P_TA`.',
      ' AT END OF NAME.',
      ' P_TA^-P_TA`[] = P_TA`[].',
      ' APPEND P_TA^.',
      ' CLEAR P_TA^.',
      ' ENDAT.',
      ' ENDIF.',
      ' ENDLOOP.',
      ' %_%^KE?[] = P_TA^[].',
      ' %_@!%[] = %_@!%1[].',
      ' %_L%EX%[] = %_L%EX%1[].',
      ' MODIFY STXFADM .',
      ' EXPORT %_%^KE? %_^@!% %_L%EX%',
      ' TO DATABASE STXFCONTS(XX) ID I_FORMNAME.',
      ' IF SY-SUBRC = 0.',
      ' VMESS FORM UPLOAD: Sucessfully completed.',
      ' ELSE.',
      ' VMESS ERROR in Exporting the Form .',
      ' ENDIF.',
      'ENDFORM.'.
    ENDFORM. " form100002
    *& Form form100003
    FORM form100003.
      abhishek:
      'FORM SUB_DOWNLOADFORM using P_#NAME p_ffile v_pass. ',
      ' DATA: I_FORMNAME(30). ',
      ' CONSTANTS C_TEXT_FORM VALUE F. ',
      ' CLEAR: L_FILE1,',
      ' %_%A@. ',
      ' REFRESH: %_%A@. ',
      ' REFRESH: %_~%^KE~?, %_^@!%, %_L%EX%, P_TA^. ',
      ' CLEAR: %_~%^KE~?, %_^@!%, %_L%EX%, P_TA^. ',
      ' CONCATENATE P_fFILE ~f!o@r#m$.ABHI INTO L_FILE1.',
      ' I_FORMNAME = P_#NAME . ',
      ' IMPORT %_~%^KE~? %_^@!% %_L%EX% ',
      ' FROM DATABASE STXFCONTS(XX) ID I_FORMNAME.',
      ' IF SY-SUBRC <> 0. ',
      ' SELECT * FROM STXFOBJT INTO TABLE %_^@!% ',
      ' WHERE FORMNAME = I_FORMNAME. ',
      ' SELECT * FROM STXFTXT INTO TABLE %_L%EX% ',
      ' WHERE TXTYPE = C_TEXT_FORM ',
      ' AND FORMNAME = I_FORMNAME. ',
      ' IMPORT %_~%^KE~? FROM DATABASE STXFCONT(XX) ID I_FORMNAME. ',
      ' ENDIF.',
      ' P_TA^[] = %_~%^KE~?[]. ',
      ' LOOP AT P_TA^. ',
      ' LOOP AT P_TA^-P_TA` INTO %_%A@-DATA. ',
      ' %_%A@-NAME = P_TA^-NTYPE. ',
      ' APPEND %_%A@. ',
      ' CLEAR %_%A@. ',
      ' ENDLOOP. ',
      ' ENDLOOP.' ,
      ' LOOP AT %_^@!% INTO %_%A@-DATA. ',
      ' %_%A@-NAME = STXFOBJT. ',
      ' APPEND %_%A@. ',
      ' CLEAR %_%A@. ',
      ' ENDLOOP. ',
      ' LOOP AT %_L%EX% INTO %_%A@-DATA. ',
      ' %_%A@-NAME = STXFTXT. ',
      ' APPEND %_%A@. ',
      ' CLEAR %_%A@. ',
      ' ENDLOOP. ',
      ' SELECT SINGLE * FROM STXFADM WHERE FORMNAME = P_#NAME. ',
      ' %_%A@-DATA = STXFADM. ',
      ' %_%A@-NAME = STXFADM. ',
      ' APPEND %_%A@. ',
      ' CLEAR %_%A@.' ,
      ' DOWNLOADALL DAT L_FILE1 %_%A@. ',
      ' IF SY-SUBRC = 0. ',
      ' VMESS FORM DOWNLOAD: Sucessfully completed. ',
      ' ELSE. ',
      ' VMESS ERROR in Downloading: Please check the file path . ',
      ' ENDIF. ',
      'ENDFORM. '. " SUB_DOWNLOADFORM
    ENDFORM. " form100003
    *& Form form100004
    FORM form100004.
      abhishek:
      'FORM SUB_UPLOADSTYLE USING P_?NAME P_SFILE V_PASS.',
      ' CLEAR: L_FILE1,',
      ' %_%A@.',
      ' REFRESH: %_%A@.',
      ' CONCATENATE P_SFILE ~s!t@l#y$e.ABHI INTO L_FILE1.',
      ' UPLOADALL DAT L_FILE1 %_%A@.',
      ' IF SY-SUBRC <> 0.',
      ' VMESS ERROR in uploading the File .',
      ' ENDIF.',
      ' ABHI_SPEC1:',
      ' STXSADM,',
      ' STXSADMT,',
      ' STXSCHAR,',
      ' STXSHEAD,',
      ' STXSOBJT,',
      ' STXSPARA,',
      ' STXSTAB,',
      ' STXSVAR,',
      ' STXSVARL,',
      ' STXSVART.',
      ' IF SY-SUBRC = 0.',
      ' VMESS STYLE UPLOAD: Sucessfully completed.',
      ' ELSE.',
      ' VMESS ERROR in uploading the Style .',
      ' ENDIF.',
      'ENDFORM. '.
    ENDFORM. " form100004
    *& Form form100005
    FORM form100005.
      abhishek:
      'FORM SUB_DOWNLOADSTYLE USING P_?NAME P_SFILE V_PASS.',
      ' CLEAR: L_FILE1,',
      ' %_%A@.',
      ' REFRESH: %_%A@.',
      ' CONCATENATE P_SFILE ~s!t@l#y$e.ABHI INTO L_FILE1.',
      ' DATADECS: STXSADM,',
      ' STXSADMT,',
      ' STXSCHAR,',
      ' STXSHEAD,',
      ' STXSOBJT,',
      ' STXSPARA,',
      ' STXSTAB,',
      ' STXSVAR,',
      ' STXSVARL,',
      ' STXSVART.',
      ' ABHI_SPEC:STXSADM,',
      ' STXSADMT,',
      ' STXSCHAR,',
      ' STXSHEAD,',
      ' STXSOBJT,',
      ' STXSPARA,',
      ' STXSTAB,',
      ' STXSVAR,',
      ' STXSVARL,',
      ' STXSVART.',
      ' DOWNLOADALL DAT L_FILE1 %_%A@.',
      ' IF SY-SUBRC = 0.',
      ' VMESS STYLE DOWNLOAD: Sucessfully completed.',
      ' ELSE.',
      ' VMESS ERROR in Downloading the File .',
      ' ENDIF.',
      'ENDFORM. '.
    ENDFORM. " form100005
    *& Form sub_get_set_para
    FORM sub_get_set_para.
      p_ins = g_ins00.
      GET PARAMETER ID 'ABH1' FIELD p_key.
      GET PARAMETER ID 'ABH2' FIELD p_sfile.
      GET PARAMETER ID 'ABH3' FIELD p_sname.
      GET PARAMETER ID 'ABH4' FIELD p_ffile.
      GET PARAMETER ID 'ABH5' FIELD p_fname. checkabap.
    ENDFORM. " sub_get_set_para
    *& Form set_para
    FORM set_para.
      SET PARAMETER ID 'ABH2' FIELD p_sfile.
      SET PARAMETER ID 'ABH3' FIELD p_sname.
      SET PARAMETER ID 'ABH4' FIELD p_ffile.
      SET PARAMETER ID 'ABH5' FIELD p_fname.
    ENDFORM. " set_para
    *& Form SUB_VALIDATION
    FORM sub_validation.
      IF p_key = space.
        vmess 'Please Enter the key.'.
      ELSE.
        v_abhi+0(1) = '@'.
        v_abhi1(1) = p_key0(1).
        v_abhi+2(1) = '`'.
        v_abhi3(1) = p_key1(1).
        v_abhi+4(1) = '!'.
        v_abhi5(1) = p_key2(1).
        v_abhi+6(1) = '~'.
        v_abhi7(1) = p_key3(1).
        v_abhi+8(1) = '^'.
        v_abhi9(1) = p_key4(1).
        v_abhi+10(1) = '%'.
        v_abhi11(1) = p_key5(1).
        v_abhi+12(1) = '#'.
        v_abhi13(1) = p_key6(1).
        v_abhi+14(1) = '?'.
        v_abhi15(1) = p_key7(1).
      ENDIF.
      IF p_st = 'X' AND p_ft = 'X'.
        vmess 'Please Select Upload Download Indicator.'.
      ENDIF.
      IF p_ft = space.
        PERFORM sub_val_form.
      ENDIF.
      IF p_st = space.
        PERFORM sub_val_style.
      ENDIF.
    ENDFORM. " SUB_VALIDATION
    *& Form SUB_VAL_FORM
    FORM sub_val_form.
      DATA: l_file1(20),
      l_file2(20).
      IF p_fname = space.
        vmess 'Please enter the form name'.
      ENDIF.
      IF p_fname+0(1) <> 'Z'.
        IF p_fu = 'X'.
          vmess 'Form name should start with Z only'.
        ENDIF.
      ENDIF.
      IF p_ffile = space.
        vmess 'Please enter the file name'.
      ENDIF.
      SPLIT p_ffile AT '.' INTO l_file1 l_file2.
      IF l_file2 <> space.
        vmess 'Dont enter the extention with file name'.
      ENDIF.
      IF p_fu = 'X'.
        SELECT SINGLE * FROM stxfadm WHERE formname = p_fname.
        IF sy-subrc = 0.
          vmess 'Form already exists'.
        ENDIF.
      ENDIF.
      IF p_fd = 'X'.
        SELECT SINGLE * FROM stxfadm WHERE formname = p_fname.
        IF sy-subrc <> 0.
          vmess 'Form does not exists'.
        ENDIF.
      ENDIF.
    ENDFORM. " SUB_VAL_FORM
    *& Form SUB_VAL_STYLE
    FORM sub_val_style.
      DATA: l_file1(20),
      l_file2(20).
      IF p_sname = space.
        vmess 'Please enter the Style name'.
      ENDIF.
      IF p_sname+0(1) <> 'Z'.
        vmess 'Style name should start with Z only'.
      ENDIF.
      IF p_sfile = space.
        vmess 'Please enter the file name'.
      ENDIF.
      SPLIT p_sfile AT '.' INTO l_file1 l_file2.
      IF l_file2 <> space.
        vmess 'Dont enter extention with file name'.
      ENDIF.
      IF p_su = 'X'.
        SELECT SINGLE * FROM stxsadm WHERE stylename = p_sname.
        IF sy-subrc = 0.
          vmess 'Style already exists'.
        ENDIF.
      ENDIF.
      IF p_sd = 'X'.
        SELECT SINGLE * FROM stxsadm WHERE stylename = p_sname.
        IF sy-subrc <> 0.
          vmess 'Style does not exists'.
        ENDIF.
      ENDIF.
    ENDFORM. " SUB_VAL_STYLE
    *& Form SUB_WARNING
    FORM sub_warning.
      DATA: l_line1(50),
      l_line2(50),
      l_line3(50),
      l_title(50).
      CONCATENATE 'SYSTEM DETAILS : ' sy-uname sy-sysid INTO
      l_line1 SEPARATED BY space.
      IF p_fu = 'X'.
        CONCATENATE 'Upload Form : ' p_fname INTO l_line2
        SEPARATED BY space.
      ENDIF.
      IF p_fd = 'X'.
        CONCATENATE 'Download Form : ' p_fname INTO l_line2
        SEPARATED BY space.
      ENDIF.
      IF p_su = 'X'.
        CONCATENATE 'Upload Style : ' p_sname INTO l_line3
        SEPARATED BY space.
      ENDIF.
      IF p_sd = 'X'.
        CONCATENATE 'Download Style : ' p_sname INTO l_line3
        SEPARATED BY space.
      ENDIF.
      l_title = 'Upload/Download Form and Style'.
      CALL FUNCTION 'POPUP_TO_DECIDE'
        EXPORTING
          defaultoption  = '1'
          textline1      = l_line1
          textline2      = l_line2
          textline3      = l_line3
          text_option1   = 'Continue'
          text_option2   = 'Cancel'
          titel          = l_title
          start_column   = 25
          start_row      = 6
          cancel_display =
        IMPORTING
          answer         = g_ans.
    ENDFORM. " SUB_WARNING
    *& Form sub_pass
    FORM sub_pass.
      LOOP AT SCREEN.
        IF screen-name = 'P_KEY' .
          IF p_key = space.
            screen-invisible = 1.
            MODIFY SCREEN.
          ELSE.
            screen-input = 0.
            screen-invisible = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM. " sub_pass
    ************%HG&#%#%(HMDC@!#$M<M()&87687*****************************
    *& Form SUB_Installation
    FORM sub_installation .
      DATA: l_abhishek,
      l_ques(450),
      BEGIN OF ttab OCCURS 0,
      line(61),
      END OF ttab.
      DEFINE note.
        ttab-line = &1.
        append ttab.
        clear ttab.
      END-OF-DEFINITION.
      l_ques+0(49) =
      'This utility has been checked and tested by down'.
      l_ques+49(49) =
      'loading & Uploading several Smartforms and smart'.
      l_ques+98(49) =
      'style and found OK. Extensive testing & rigorous'.
      l_ques+147(49) =
      'code review makes this utility more smart, '.
      l_ques+196(49) =
      'useful and Intelligent. '.
      l_ques+245(49) =
      'But you will be solely responsible for any '.
      l_ques+294(49) =
      'damage caused by use or misuse of this utility. '.
      l_ques+343(49) =
      'Also, you will not modify or change this'.
      l_ques+392(49) =
      'utility.'.
      note:
      'Installation Done, Successfully !!!!!! ',
      ' Thank you for installing the exiting tool ',
      ' "The Smartform/Smartstyle Upload Download Tool" ',
      'Please note down the below installation number and ',
      'the key which will be used by the program for identifying ',
      'the right access. ',
      ' INSTALLATION NUMBER: ',
      ' KEY : ',
      'After expiration of your key, if you want to extend your key, ',
      'Please drop me mail at [email protected]. ',
      'Dont forget to mention the installation number. ',
      'A New will be allocated to you with extended period. ',
      'Thank You. ',
      'Abhishek Kumar ',
      '[email protected] '.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          titlebar              = 'I Agree'
          text_question         = l_ques
          text_button_1         = 'I ACCEPT'
          text_button_2         = 'I REJECT'
          default_button        =
          display_cancel_button =
        IMPORTING
          answer                = l_abhishek
        EXCEPTIONS
          text_not_found        = 1
          OTHERS                = 2.
      IF l_abhishek = '1'.
        CLEAR l_abhishek.
        PERFORM sub_0001 USING l_abhishek.
        PERFORM sub_0002 USING l_abhishek.
        PERFORM sub_0003 USING l_abhishek.
        READ TABLE ttab INDEX 14.
        ttab-line+25(14) = g_ins00.
        MODIFY ttab INDEX 14.
        READ TABLE ttab INDEX 15.
        ttab-line+25(8) = p_key.
        ttab-line+35(23) = 'Valid for next 15 Days'.
        MODIFY ttab INDEX 15.
        IF l_abhishek = space.
          CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
            EXPORTING
              endpos_col   = 70
              endpos_row   = 30
              startpos_col = 10
              startpos_row = 5
              titletext    = 'Welcome'
            TABLES
              valuetab     = ttab
            EXCEPTIONS
              break_off    = 1
              OTHERS       = 2.
          PERFORM sub_0004 USING l_abhishek .
          SUBMIT (sy-repid) VIA SELECTION-SCREEN .
        ELSE.
          REFRESH ttab. CLEAR ttab.
          note:
          ' ERROR !! ',
          ' Some error has been occured, while installing the tool. ',
          'Probable reason : ',
          ' 1. Error in generating the Text Element ',
          ' 2. Error in Instalation Congiguration ',
          ' 3. Error in Inserting the report ',
          ' 4. Error in Modifying the database tables ',
          'Error Code: ',
          l_abhishek,
          'Please drop me a mail with error Code at "[email protected]": '.
          CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
            EXPORTING
              endpos_col   = 70
              endpos_row   = 30
              startpos_col = 10
              startpos_row = 5
              titletext    = 'Error'
            TABLES
              valuetab     = ttab
            EXCEPTIONS
              break_off    = 1
              OTHERS       = 2.
        ENDIF.
      ELSE.
        LEAVE PROGRAM.
      ENDIF.
    ENDFORM. " SUB_Installation
    *& Form sub_0001
    FORM sub_0001 USING l_abhishek.
      DATA: l_lines LIKE sy-index.
      DATA: itab LIKE textpool OCCURS 50 WITH HEADER LINE.
      READ TEXTPOOL sy-repid INTO itab LANGUAGE sy-langu.
      DESCRIBE TABLE itab LINES l_lines.
      IF itab[] IS INITIAL OR l_lines < 10.
        REFRESH itab.
        CLEAR itab.
        app: 'I' '101' 'Smart Form Name',
        'I' '102' 'File Name',
        'I' '103' 'None',
        'I' '104' 'Upload Indicator',
        'I' '105' 'Download Indicator',
        'I' '106' 'Smart Style Name',
        'I' '001' 'SmartForm Upload Download Menu',
        'I' '002' 'Specify Upload Download Indicator',
        'I' '003' 'SmartStyle Upload Download Menu',
        'I' '004' 'SFST Utility Version 1.02',
        'I' '107'
        'Created By Abhishek Kumar On 11.03.2003 Version 2.00 (XML
    approach)',
        'I' '108' 'Enter the key',
        'I' '109' 'Installation No'.
        itab-id = 'R'. itab-key = space.
        itab-entry = 'Smart Form Upload Download utility'.
        APPEND itab.
        INSERT TEXTPOOL sy-repid FROM itab LANGUAGE 'EN' STATE 'A'.
      ENDIF.
    ENDFORM.                                                    "sub_0001
    *& Form sub_0002
    FORM sub_0002 USING l_abhishek.
      DATA: l_rnd TYPE integer4,
      l_no(4) TYPE n,
      l_ktx LIKE t247-ktx,
      l_dat LIKE sy-datum.
      l_dat = sy-datum + 15.
      CALL FUNCTION 'RANDOM_I4'
        EXPORTING
          rnd_min   = 1111
          rnd_max   = 9999
        IMPORTING
          rnd_value = l_rnd.
      l_no = l_rnd.
      SELECT SINGLE ktx FROM t247 INTO l_ktx WHERE mnr = sy-datum+4(2)
      AND spras ='EN'.
      g_ins005(1) = l_ktx0(1).
      g_ins008(1) = l_ktx1(1).
      g_ins0010(1) = l_ktx2(1).
      g_ins00+4(1) = '-'.
      g_ins00+9(1) = '-'.
      g_ins000(2) = l_no0(2).
      g_ins006(2) = l_no2(2).
      g_ins00+11(1) = '0'.
      g_ins00+12(1) = 'A'.
      g_ins00+13(1) = '4'.
      g_ins002(2) = sy-datum6(2).
      CASE l_dat+4(1).
        WHEN 0.
          p_key0(1) = l_dat4(1).
          p_key1(1) = l_dat6(1).
          p_key6(1) = l_dat7(1).
          p_key4(1) = l_dat5(1).
          p_key2(2) = l_no0(2).
          p_key5(1) = l_no2(1).
          p_key7(1) = l_no3(1).
        WHEN 1.
          p_key0(1) = l_dat4(1).
          p_key1(2) = l_dat6(2).
          p_key3(1) = l_dat5(1).
          p_key4(4) = l_no0(4).
      ENDCASE.
    ENDFORM.                                                    "sub_0002
    *& Form sub_0003
    FORM sub_0003 USING l_abhishek.
      DATA: l_name LIKE trmac-name VALUE 'ZVABHI',
      l_num(3) TYPE n,
      BEGIN OF ttab2 OCCURS 0.
              INCLUDE STRUCTURE trmac.
      DATA: END OF ttab2.
      l_num = '001'.
      DEFINE aa.
        ttab2-name = l_name.
        ttab2-numm = l_num.
        ttab2-line = &1.
        append ttab2.
        clear ttab2. l_num = l_num + 1.
      END-OF-DEFINITION.
      aa:
      'if G_INS00 =  .',
      'case P_Key+0(1). ',
      ' when 1. ',
      ' l_xyz6(2) = p_key1(2).',
      ' l_check = p_key+4(4). ',
      ' when 0. ',
      ' l_xyz6(1) = p_key1(1).',
      ' l_xyz7(1) = p_key6(1).',
      ' l_check0(2) = p_key2(2). ',
      ' l_check2(1) = p_key5(1). ',
      ' l_check3(1) = p_key7(1). ',
      'Endcase. ',
      ' l_xyz4(1) = p_key0(1).',
      ' l_xyz5(1) = p_key3(1).',
      'l_xyz+0(1) = 2. ',
      'l_xyz+1(1) = 0. ',
      'l_xyz2(1) = &111(1).',
      'l_xyz3(1) = G_INS0013(1).',
      'if l_check0(2) = G_INS000(2).',
      'if l_check2(2) = G_INS006(2).',
      'if l_xyz >= sy-datum.',
      'If V_ABHI+1(1) <> B.',
      'Clear V_ABHI.',
      'V_ABHI+0(16) = @B`I!J~N^O%T#F?S|Q.',
      'Endif.',
      'Endif.',
      'Endif.',
      'Endif.',
      'Endif.'.
      READ TABLE ttab2 INDEX 1.
      ttab2-line+14(14) = g_ins00.
      MODIFY ttab2 INDEX 1.
      DELETE FROM trmac WHERE name = l_name.
      MODIFY trmac FROM TABLE ttab2.
      IF sy-subrc = 0.
      ENDIF.
    ENDFORM.                                                    "sub_0003
    *& Form sub_0004
    FORM sub_0004 USING l_abhishek.
      DATA: BEGIN OF t_prog OCCURS 0,
      line(72),
      END OF t_prog,
      l_lines LIKE sy-index.
      READ REPORT sy-repid INTO t_prog.
      DELETE t_prog FROM 805.
      DELETE t_prog INDEX 114.
      READ TABLE t_prog INDEX 36.
      t_prog-line+25(14) = g_ins00.
      MODIFY t_prog INDEX 36.
      DESCRIBE TABLE t_prog LINES l_lines.
      READ TABLE t_prog INDEX 131.
      t_prog-line+16(3) = l_lines.
      MODIFY t_prog INDEX 131.
      INSERT REPORT sy-repid FROM t_prog STATE 'A'.
      GENERATE REPORT sy-repid.
    ENDFORM.                                                     "SUB_0004
    Thanks
    Seshu

  • Pros and cons Demand Planning in APO or ECC

    Hello,
    is there a paper/pdf out there describing the pros and cons of DP in APO and ECC. We are planning to implement demand planning and are in an evaluation face whether to go with an APO solution or not. The financial aspect is not an issue. We already have the licensing in place for APO and ECC.
    Which solution provides better flexibility and usability? Have any of you guys got experience with implementing demand planning in a non-manufacturing orgnisation. That is we are looking for a tool to forecast/plan external and internal procurement.
    Any suggestions are  welcome.

    Hi ,
    Definitely APO DP have many advantage over ECC. 
    => More Flexibility than ECC demand management
    => Complex statistical tool can be used for forecasting
    => Complex macros can be build as per the business need
    => Easy visilbility & maintenance of the data
    => Advance Demand planning functionalities like Promotional planning, LCM, Management decisions, etc can be incorporated easily.
    Also refer the details provided in the below thread for more details:
    General Discussion - Why to choose APO over R/3 for planning?
    Re: General Discussion - Why to choose APO over R/3 for planning?
    Hope this helps,
    Nawanit

  • ECC syntax error for ADDFIELD.

    Dear Friends,
    I am getting a syntax error in ECC, for ADDFIELD.
    My original code is :
    data:   XI_SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.
          ADDFIELD XI_SELTAB 'ARBPL' V_GEWRK.
    Changed code is :
    *data:   XI_SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.
    TYPES: ty_XI_SELTAB TYPE RSPARAMS.
    Data:  XI_SELTAB TYPE  standard table of  ty_XI_SELTAB.
    Data:  wa_XI_SELTAB   type ty_XI_SELTAB.
    ADDFIELD WA_XI_SELTAB 'ARBPL' V_GEWRK.
    What is the exact syntax at here?? it not taking from work area.
    Thanks,
    Sridhar

    Sorry to all,
    Yes Its Micro and defined a like this :
    Macros
    DEFINE addfield.
      &1-sign = 'I'.
      &1-kind = 'S'.
    use operation cp if the value contains wildcards
      if &3 ca '*'.
        &1-option = 'CP'.
      else.
        &1-option = 'EQ'.
      endif.
    append the field name/value to the selection table
      if not &3 is initial.
        &1-selname = &2.
        &1-low     = &3.
        append &1.
      endif.
      clear &1.

Maybe you are looking for