Assign Full Marks Pls give me some gud doc on A/C receivable

Dear Gurus,
pls help me .
i need some gud document on a/c receivable .
my mail id is :[email protected]
Regrds
Mahesh K Singh

hi
check your email,
if you find those docs to be helpful please do assign the points here
regards
Jay

Similar Messages

  • Difference between L1,L2 and L3 support,pls give me some examples

    Hi,
    can u please tell me the difference between L1,L2 AND L3 SUPPORT.pls give me some examples

    knowledgespring wrote:
    People keep ask which level support are you supporting..? how do we answer to these questions in interview.. could one please provide info on this.
    thank you in advance.Since the terms themselves can be defined differently by different organizations, you'll have to ask the interviewer how HE defines those terms. Once you know that you should know the answer. In asking him how he defines them, you might explain that you are asking because you know the terms can mean different things to different organizations.

  • I need help ! Pls give me some advice rgds my 5800...

    My phone firmware version is V20.
    i`ve meet a few problem after updating the phone software from Nokia Care Center.
    1. After updating, due to the issued of the CALL WAITING, now everytime when i am using the phone, if someone call me the phone never alert me again if there is a second incoming call. (Never show " waiting" alert but only the incoming call number)
    2. It happen also if i call others when they are using the phone.
        ( For the previous model of phone i am with Nokia, i knew it should have an alert if the person i called is currently on the line) 
    3. Memory Card problem
       - My MESSAGE memory in use is set to save in MEMORY CARD. But the problem is, it always switch back to
         phone memory itself and display a notice to me " unable to save message in memory card ", after
         that the message setting will turn back to the phone memory again.
     4. LCD Screen problem
        - Its not because of any screen crack problem, but i think is worst than it because sometime when i operating
          the phone, the screen will change the colour itself, sometime Green, Purple, Grey Or Red and sometime
          turn it to a black screen also. Ecspecially when i am writing the message or playing games. So i need to use
          the screen lock key to Lock and Unlock again to solve the problem.
          ( Is it the problem with the LCD Display ? Or... It just because the firmware problem ? ) 
    Thks/Rgds
    Vallen from Malaysia

    try the hard reset if it fails send to a nokia care centre
    With your 5800 turned off,
    Press and hold [Green]  + [Red] + [Camera] Keys
    Turn phone ON, and keep pressing it until you see the Nokia Shaking Hands Logo.
    The Default code is still 12345, of course
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Pls send some usefull doc related to CO

    MODERATOR:  Do not post your email address or links to copyrighted information on these forums.  If you do, the thread will be LOCKED and all points UNASSIGNED.  If you have some information, please consider posting it to the [Wiki|https://wiki.sdn.sap.com/wiki/display/ERPFI/Home] rather than sharing via email.  Than you for your assistance.
    Dear Gurus,
    Pls send some usefull doc related to CO(Eg Presentation or user manual) on removed by moderator
    i assign full marks to u.
    Regards
    Mahesh

    Hi Mahesh,
    Please check the below link, it may hep you....
    http://www.sapficoconsultants.com/thanku.html
    if useful pl assign points
    thanks
    PVK

  • Offsetting account showing as * mark pls see the screen shot

    Dear floks pls give me some inputs
    we need to provide a report to colleagues Tax affairs when it relates to
    the nature of the recordings on the accounts 3140600010/4150400010 2013. To do
    this we used the FAGLL03 and with a layout with Offst.acct / Name Offs.
    Account.
    Unfortunately, in the transaction of these two accounts are in the field of
    postings that Offst. Acct marked with the * sign, which makes analysis
    impossible. (In general, are clearing supplier, customer or GL, but we need to
    know exactly)
    Is there a possibility to see all the Offsetting Account?
    why the offsetting account is not showing
    pls urgent

    Hi
    Check if the document which are showing * in the offsetting field have more than one account. Generally this issue happens with the coding for the BTE implementation.
    Thanks & regards
    Sanil Bhandari

  • Pls. give some suggestion on Subsequent Credit and debit note?

    Dear Gurus,
    Pls. give some suggestion on Subsequent Credit and debit note?
    Regrds
    Shikha

    Hi Sikha
    We generaly use subsequent debit / credit to adjust invoice value without affecting Qty
    Pls check notes supplied by SAP
    A subsequent debit/credit arises if a transaction has already been settled, and a further invoice or credit memo is received afterwards.
    A subsequent debit/credit changes the total invoice value of a purchase order item; the total invoice quantity remains unchanged. Therefore, only a value-based update of the purchasing transaction takes place. There is no quantity-based update.
    You must enter an invoice as a subsequent debit if a purchase order item has already been invoiced and further costs are incurred. (Example: A vendor has inadvertently invoiced you at too low a price and then sends a second invoice for the difference.)
    You must enter a credit memo as a subsequent credit if a purchase order item was invoiced at too high a price and now you have received a credit memo. (Example: A vendor has inadvertently invoiced you at too high a price and then sends a credit memo for the difference.)
    If you enter a subsequent debit/credit, the system suggests the entire invoiced quantity, but no value. The maximum quantity that you can subsequently debit or credit is the quantity that has already been invoiced.
    You can only enter a subsequent debit/credit for a purchase order item if an invoice has already been posted for that item.
    A subsequent debit/credit cannot refer to a particular invoice.
    Subsequent debits and credits are listed separately in the PO history
    Typical example is like
    suppose vendor has overcharged u for perticular PO and afterward he want to correct it
    In such scenario u can post subsequent debit to correct PO without affecting Qty. field
    <b>Reward if usefull</b>
    Vishal..

  • Hello !  pls give some ti[ps how to use bapi's for data uploading?

    hello !
      pls give some ti[ps how to use bapi's for data uploading?
    regards,
    Arjun

    Hi,
    See the below report extract:
    where it_data is having uploaded data.
    LOOP AT<b> it_data</b> INTO wa_data.
        line_count = sy-tabix.
        "Date Validation
        CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
        INTO wa_data-uplft_date.
        "READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
        LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
          IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
            MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
            APPEND wa_ekko TO it_ekko.
          ENDIF.
        ENDLOOP.
        "IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
        LOOP AT it_ekko INTO wa_ekko.
          wa_data_header-pstng_date = wa_data-uplft_date.
          wa_data_header-doc_date = sy-datum.
          wa_data_header-bill_of_lading = wa_data-bill_of_lad.
          wa_data_header-ref_doc_no = wa_data-del_no.
          CONCATENATE wa_data-header_text1 '-'
                      wa_data-header_text2 '-'
                      wa_data-header_text3 '-'
                      wa_data-header_text4
                      into wa_data_header-HEADER_TXT.
          IF wa_data-indicator = 'Y'.
            wa_data_item-material = '000000000000200568'.
          ELSE.
            wa_data_item-material = '000000000000200566'.
          ENDIF.
          LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
            "Collect Item Level Data
            wa_data_item-plant = '1000'.
            wa_data_item-stge_loc = '1001'.
            wa_data_item-move_type = '101'.
            wa_data_item-vendor = wa_data-vendor.
            wa_data-qnty = wa_data-qnty / 1000.
            wa_data_item-entry_qnt = wa_data-qnty.
            wa_data_item-po_pr_qnt = wa_data-qnty.
            wa_data_item-entry_uom = 'KL'.
            wa_data_item-entry_uom_iso = 'KL'.
            wa_data_item-orderpr_un = 'KL'.
            wa_data_item-orderpr_un_iso = 'KL'.
            wa_data_item-no_more_gr = 'X'.
            wa_data_item-po_number = wa_ekpo-ebeln.
            wa_data_item-po_item = wa_ekpo-ebelp.
            wa_data_item-unload_pt = wa_data-unload_pt.
            wa_data_item-mvt_ind = 'B'.
            APPEND wa_data_item TO it_data_item.
            CLEAR wa_data_item.
          ENDLOOP.
          CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              goodsmvt_header = wa_data_header
              goodsmvt_code   = goodsmvt_code
              testrun         = 'X'
            TABLES
              goodsmvt_item   = it_data_item
              return          = return.
          READ TABLE return INTO wa_return WITH KEY type = 'S'.
          IF sy-subrc <> 0.
            DESCRIBE TABLE return LINES sy-tfill.
            IF sy-tfill = 0.
              CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>   
            EXPORTING
                  goodsmvt_header = wa_data_header
                  goodsmvt_code   = goodsmvt_code
                  testrun         = ' '
                TABLES
                  goodsmvt_item   = it_data_item
                  return          = return.
              CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
               EXPORTING
                 WAIT          = 'X'
              IMPORTING
                RETURN        =
            ENDIF.
          ENDIF.
          LOOP AT return INTO wa_return.
            WRITE: 'Messsage TYPE  ', wa_return-type,
                  /,'ID  ', wa_return-id,
                  /, 'Number  ', wa_return-number,
                  /, 'Message  ', wa_return-message,
                  /, 'Long Text  ', wa_return-message_v1,
                                    wa_return-message_v2,
                                    wa_return-message_v3,
                                    wa_return-message_v4,
                 /, 'Failed at line', line_count.
          ENDLOOP.
          CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
        ENDLOOP.
    Reward if useful!

  • Pls give some shell scripting for sql/plsql

    pls give some shell scripting for sql/plsql

    794244 wrote:
    pls give some shell scripting for sql/plsqlNeither SQL or PL/SQL are shell script languages. Both are server side languages that executes inside an Oracle database server process.
    This is an important concept to understand when using SQL*Plus for example to "script" interaction with an Oracle database.

  • Pls give some hints on this algurithum

    in a 4x4 chess grids, so 16 squares
    i have four pieces person, wumpus , pit, gold
    person is player in chess.you muss move it.
    person would fall in pit, person would grab gold
    person would be eaten by wumpus,
    so i must radomly inintialize proper positions for
    4 pieces.and also. other pieces couldnot encircle
    person, could still leave a space for person to
    move.
    please any of you have good algurithum of it?
    or give some hints?
    thanks in advance

    OK, here's a basic methodology from the vaults of my brain:
    __0 __1 __2 __3
    __4 __5 __6 __7
    __8 __9 _10 _11
    _12 _13 _14 _15
    Given four squares, numbered as above, you need to randomly place three items
    (wumpus, pit, gold), then place the person so that they are able to move,
    correct? I suppose that the person should be able to reach gold, pit, and
    wumpus?
    Consider a slightly larger square:
    - X X X X -
    - X X X X -
    - X X X X -
    - X X X X -
    - - - - - -This has the original square in the middle with some border to allow proper
    numerical manipulation.
    OK, now we take the blocks and add them numerically to an array:
    String[] board = new String(36);Looking back at the larger block above, given a square, it must not be the
    case that:
    (board[squareIndex + 6] is border or taken and
    board[squareIndex - 6] is border or taken and
    board[squareIndex - 1] is border or taken and
    board[squareIndex + 1] is border or taken)
    and it must be the case that 6 < squareIndex < 29Lets look at a full listing of possible indices in the array:
    0  1  2  3  4  5 
    6  7  8  9 10 11
    12 13 14 15 16 17
    18 19 20 21 22 23
    24 25 26 27 28 29
    30 31 32 33 34 35If you take each index, divide by 7 and add index modulo 7
    (int i = index/7 + index % 7) you get the following result:
    0  1  2  3  4  5
    6  7  2  3  4  5
    6  7  2  3  4  5
    6  7  8  3  4  5
    6  7  8  9  4  5
    6  7  8  9 10  5
    We've already set the requirement that 6 < index < 29, leaving the following:
    6  7  2  3  4  5
    6  7  2  3  4  5
    6  7  8  3  4  5
    6  7  8  9  4  5
    So,
    if int i = (index/7 + index%7), then i < 5 or i> 6 (i != 5 && i !=6), giving a
    test for a valid square within the array, if needed.
    As long as one of the adjoining squares (I'm assuming lateral movement only)
    is open, then the person can be placed and still move. Of course, for all
    items to be accessible, then none of the items can be blocked, and all of
    the placed items must be checked after a new item selects a position to
    make sure that all is well; if a position for an item is chosen that blocks
    another item, then choose a different position and try again.
    It will speed things up if you can keep track of the failed positions so you
    know not to try them again, as well as keeping track of placed items so you
    don't try to place two items in the same square.
    Are there better ways to do this? No doubt; this is a quick shaking-of-the-
    tree to see what fell out, but hopefully it will give you some place to start.
    I haven't coded a Wumpus in over 20 years; thanks for the trip down memory
    lane!

  • What happens when the computer get too full of e-mails?  Will it automatically start deleting ... or give you some kind of warning??  I never delete personal mail right away since I might want to refer back to it, and then the first thing I know, I've got

    What happens when the computer get too full of e-mails?  Will it automatically start deleting ... or give you some kind of warning??  I never delete personal mail right away since I might want to refer back to it, and then the first thing I know, I've got a big backlog. 

    It will not automatically delete any emails; you will need to do that. You may suffer performance  issues in Mail  if you let your mailboxes become too bloated. And, aside from Mail, the files take up a lot of room are photos, videos, and music, so you might want to watch those - every once in a while, check how much hard drive space you have and make sure you empty the trash regularly. Checking your hard drive space: highlight your Macintosh HD icon on the desktop; hit Command  + I and check the total capacity, and how much is left.

  • HT1430 Hi I am having a problem to delete call log in iPhone 3GS from last 1 month, I have restore iPhone many times but it doesn't works, pls give me a solution , whenever I try to delete call log it's hang for some time.

    Hi I am having a problem to delete call log in iPhone 3GS from last 1 month, I have restore iPhone many times but it doesn't works, pls give me a solution , whenever I try to delete call log it's hang for some time, pls tell me how to restore call delete option

        jsavage9621,
    It pains me to hear about your experience with the Home Phone Connect.  This device usually works seamlessly and is a great alternative to a landline phone.  It sounds like we've done our fair share of work on your account here.  I'm going to go ahead and send you a Private Message so that we can access your account and review any open tickets for you.  I look forward to speaking with you.
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • Error Fixing..please help me..full marks wud be given........

    I am getting a following error when i run the program in ECC 6.o
    ERROR:" The where condition does not refer to for all entries table..
    program is as follows..full marks wud be given.....
    ***INCLUDE MZSDRETL_RMP_PRICING_ENTRYF01 .
    *&      Form  COMPUTE_SCROLLING_IN_TC
    Vertical Scrolling in table control upon pressing , next page,
    previous page , first page and last page button
         -->P_TC_NAME   table control name
         -->P_OK_CODE   okcode
         -->P_LOOPC     current loop count
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                          P_OK_CODE
                                          P_LOOPC.
    -BEGIN OF LOCAL DATA----
      DATA L_TC_NEW_TOP_LINE    LIKE SY-TABIX.
      DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE CXTAB_CONTROL.
    -END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
      IF <TC>-LINES = 0.
        L_TC_NEW_TOP_LINE = 1.
      ELSE.
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  ENTRY_ACT      = <TC>-TOP_LINE
                  ENTRY_FROM     = 1
                  ENTRY_TO       = <TC>-LINES
                  LAST_PAGE_FULL = C_X
                  LOOPS          = P_LOOPC
                  OK_CODE        = P_OK_CODE
                  OVERLAPPING    = C_X
             IMPORTING
                  ENTRY_NEW      = L_TC_NEW_TOP_LINE.
            exceptions
                 no_entry_or_page_act  = 01
                 no_entry_to           = 02
                 no_ok_code_or_page_go = 03
                 others                = 99.
      ENDIF.
    get actual tc and column                                             *
      GET CURSOR FIELD L_TC_FIELD_NAME .
      IF SY-SUBRC = 0.
        set actual column                                                *
        SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
      ENDIF.
    set the new top line                                                 *
      <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                    " COMPUTE_SCROLLING_IN_TC
    *&      Form  GET_VALUE_ON_REQUEST
    Call function module to display the region list in form of search help
    FORM GET_VALUE_ON_REQUEST TABLES RET
                              USING    P_C_RET
                                       P_C_DYN
                                       P_DYNNR.
    Call function module to display the data in internal table in form of
    a search help
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD    = P_C_RET
                DYNPPROG    = G_REPID
                DYNPNR      = P_DYNNR
                DYNPROFIELD = P_C_DYN
                VALUE_ORG   = C_VAL_ORG  " Value S
           TABLES
                VALUE_TAB   = RET.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_VALUE_ON_REQUEST
    *&      Form  POPULATE_RANGES
          Populate range tables with store grouping data
         -->P_I_STORE_INFO  store grouping entry
    FORM POPULATE_RANGES USING L_REGION_ID
                               L_DIST_ID
                               L_AREA_ID
                               L_STORE_ID.
      CLEAR : R_REGION , R_DIST , R_AREA , R_STORE .
      CLEAR : R_REGION[] , R_DIST[] , R_AREA[] , R_STORE[].
    populate region
      IF NOT L_REGION_ID IS INITIAL.
        R_REGION-SIGN = C_SIGN.
        R_REGION-OPTION = C_OPT1.
        R_REGION-LOW = L_REGION_ID.
        APPEND R_REGION.
        CLEAR R_REGION.
      ENDIF.
    populate district
      IF NOT L_DIST_ID IS INITIAL.
        R_DIST-SIGN = C_SIGN.
        R_DIST-OPTION = C_OPT1.
        R_DIST-LOW = L_DIST_ID.
        APPEND R_DIST.
        CLEAR R_DIST.
      ENDIF.
    populate area
      IF NOT L_AREA_ID IS INITIAL.
        R_AREA-SIGN = C_SIGN.
        R_AREA-OPTION = C_OPT1.
        R_AREA-LOW = L_AREA_ID.
        APPEND R_AREA.
        CLEAR R_AREA.
      ENDIF.
    populate store
      IF NOT L_STORE_ID IS INITIAL.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = L_STORE_ID
             IMPORTING
                  OUTPUT = L_STORE_ID.
        R_STORE-SIGN = C_SIGN.
        R_STORE-OPTION = C_OPT1.
        R_STORE-LOW = L_STORE_ID.
        APPEND R_STORE.
        CLEAR R_STORE.
      ENDIF.
    ENDFORM.                    " POPULATE_RANGES
    *&      Form  GET_TABLE_ROW_VALUES
      Get the field values of the current row of the table
      l_stepl - current row no.
    FORM GET_TABLE_ROW_VALUES USING L_STEPL.
      DATA: L_REPID LIKE D020S-PROG.
      REFRESH I_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-REGION_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-DIST_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-AREA_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-ATTR_VAL'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'I_STORE_INFO-STORE_ID'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      WA_DYNPREAD-STEPL = L_STEPL.
      WA_DYNPREAD-FIELDNAME = 'ZPRICELIST-ZLIST'.
      APPEND WA_DYNPREAD TO I_DYNPREAD.
      CLEAR WA_DYNPREAD.
      L_REPID = G_REPID .
    Call function to get the screen data
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME     = L_REPID
                DYNUMB     = SY-DYNNR
           TABLES
                DYNPFIELDS = I_DYNPREAD.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_TABLE_ROW_VALUES
    *&      Form  DETERMINE_LEVEL
    Determine the level of store grouping info entered
        Region                  - 1
        Region/Dist             - 2
        Region/Dist/Area        - 3
        Region/Dist/Area/Store  - 4
    FORM DETERMINE_LEVEL USING    P_I_STORE_INFO LIKE I_STORE_INFO.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND P_I_STORE_INFO-DIST_ID IS INITIAL
         AND P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL1.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL2.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND  NOT P_I_STORE_INFO-AREA_ID IS INITIAL
         AND P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL3.
      ENDIF.
      IF NOT P_I_STORE_INFO-REGION_ID IS INITIAL
         AND NOT P_I_STORE_INFO-DIST_ID IS INITIAL
         AND NOT P_I_STORE_INFO-AREA_ID IS INITIAL
         AND NOT P_I_STORE_INFO-STORE_ID IS INITIAL.
        P_I_STORE_INFO-LEVEL = C_LEVEL4.
      ENDIF.
    ENDFORM.                    " DETERMINE_LEVEL
    *&      Form  GET_SY_STEPL
        Get the current record number in the table control.
         -->P_L_STEPL  text
    FORM GET_SY_STEPL USING    P_L_STEPL LIKE SY-STEPL.
      CLEAR P_L_STEPL.
      CALL FUNCTION 'DYNP_GET_STEPL'
          IMPORTING
               POVSTEPL        = P_L_STEPL
       EXCEPTIONS
            STEPL_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.
    ENDFORM.                    " GET_SY_STEPL
    *&      Form  GET_POPUP_CONFIRM
          Display the popup to confirm the user
    FORM GET_POPUP_CONFIRM USING    P_L_ANS
                                    P_G_POPUP_TEXT
                                    G_LINE_TEXT.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
           EXPORTING
                TITLEBAR      = G_LINE_TEXT
                TEXT_QUESTION = P_G_POPUP_TEXT
           IMPORTING
                ANSWER        = P_L_ANS.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " GET_POPUP_CONFIRM
    *&      Form  GOTO_SKU_HIER_SCREEN
    Upon user wishes to go to the detail screen , a check is performed
    to determine if any existing promo or pricing is already available
    for the entered store grouping info . If it is available then
    prompt a message to the user 'Already promo exists if  user wants to
    go to the detail screen ?'. If the user presses 'Yes' then then
    detail screen will appear otherwise the header screen will appear
    FORM GOTO_SKU_HIER_SCREEN.
      CLEAR G_CHECK_ENTRY.
    Check the store grouping entries beforr switching to detail screen.
      PERFORM CHECK_STORE_ENTRIES.
      CHECK G_CHECK_ENTRY IS INITIAL.
      READ TABLE I_STORE_INFO WITH KEY REGION_ID = C_SPACE
                                       DIST_ID = C_SPACE
                                       AREA_ID = C_SPACE
                                       STORE_ID = C_SPACE
                                       ATTR_VAL = C_SPACE.
      IF SY-SUBRC = 0.
        DELETE I_STORE_INFO WHERE  REGION_ID = C_SPACE
                            AND    DIST_ID = C_SPACE
                            AND    AREA_ID = C_SPACE
                            AND    STORE_ID = C_SPACE
                            AND    ATTR_VAL = C_SPACE.
      ENDIF.
    perform check for the duplicate store grouping data.
      PERFORM CHECK_DUPLICATE_STRGRP_DATA.
    If any duplicate entry is found then user will be prompted with the
    message if he/she wants to delete those duplicate entries . If 'Yes'
    is pressed then all the duplicate entries will be deleted or else
    if 'No' is pressed , then user will remain in the same header screen
      IF    G_DUPLICATE_ENTRY = C_X.
        CONCATENATE TEXT-058 TEXT-059
        INTO   G_POPUP_TEXT
        SEPARATED BY SPACE.
        CLEAR G_ANS.
        CLEAR G_LINE_TEXT.
    Get the pop-up to confirm the operation
        PERFORM GET_POPUP_CONFIRM USING G_ANS
                                        G_POPUP_TEXT
                                        G_LINE_TEXT.
        IF G_ANS = '1'.
    Delete the duplicate entries
          DELETE ADJACENT DUPLICATES FROM I_STORE_INFO COMPARING REGION_ID
                                                                 DIST_ID
                                                                 AREA_ID
                                                                 STORE_ID
                                                                 ATTR_VAL.
          MESSAGE S161(ZS) WITH TEXT-003.
        ENDIF.
      ELSE.
    Perform the duplicate entry check for create or change pricing
        IF G_MAIN_OKCODE = 'PRCC' OR G_MAIN_OKCODE = 'CRPR'.
          IF I_STORE_INFO[] IS INITIAL.
            MESSAGE S161(ZS) WITH TEXT-004.
          ELSE.
            CLEAR G_FLAG.
            LOOP AT I_STORE_INFO WHERE NOT REPROMO IS INITIAL.
              G_FLAG = C_X.
              EXIT.
            ENDLOOP.
    Prompt the message by calling the function module for pop-up confirm
            IF NOT G_FLAG IS INITIAL.
              CONCATENATE TEXT-061 TEXT-062
                           INTO G_POPUP_TEXT SEPARATED BY SPACE .
              CLEAR G_LINE_TEXT.
              PERFORM GET_POPUP_CONFIRM USING G_ANS
                                              G_POPUP_TEXT
                                              G_LINE_TEXT.
              IF G_ANS = C_ANS1.
                CLEAR G_ANS.
                PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                TBCL3-TOP_LINE = 1.
               call screen 9002.
                LEAVE TO SCREEN 9002.
    End of DEVK939178
              ENDIF.
            ELSE.
              PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
              TBCL3-TOP_LINE = 1.
              LEAVE TO SCREEN 9002.
             call screen 9002.
    End of DEVK939178
            ENDIF.
          ENDIF.
        ELSE.
    If user does not input any store grouping info in the header screen
    and opts to go to the detail, then message will appear to the user as
    'A Promo is going to be applied on the Price List type '. This will
    necessarily be a % promo as the promo is going to applied across all
    the SKUs that belong to that price list type which is irrespective of
    the price of individual SKUs
          IF I_STORE_INFO[] IS INITIAL.
            IF G_PRICING_VIEW_FLAG = C_X       " DEVK939197
              OR G_PROMO_VIEW_FLAG = C_X.      " DEVK939197
              LEAVE TO SCREEN 9002.
            ELSE.
              IF G_PROMO_PLTYP <> C_X.
                CLEAR G_POPUP_TEXT.
                CLEAR G_LINE_TEXT.
                CONCATENATE TEXT-063 TEXT-062
                             INTO G_POPUP_TEXT SEPARATED BY SPACE .
                PERFORM GET_POPUP_CONFIRM USING G_ANS
                                                G_POPUP_TEXT
                                                G_LINE_TEXT.
                IF G_ANS = C_ANS1.
    If user opts 'Yes' then another screen will appear where the user can
    give the value of the % promo that is going to be applied on the
    pricelist type
                  G_PROMO_PLTYP = C_X.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                  CLEAR I_STORE_INFO.
                  I_STORE_INFO-LEVEL = C_LEVEL6.
                  APPEND I_STORE_INFO.
                  TBCL3-TOP_LINE = 1.
                  PERFORM CHECK_EXIST_PROMO_STR .
                  PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
                  LEAVE TO SCREEN 9002.
               call screen 9002.
    End of DEVK939178
             call screen 9006 starting at 10 5 ending at 70 10.
                ELSE.
                  MESSAGE S161(ZS) WITH TEXT-004.
                ENDIF.
              ENDIF.
            ENDIF.
          ELSE.
            CLEAR G_FLAG.
            LOOP AT I_STORE_INFO WHERE NOT REPROMO IS INITIAL.
              G_FLAG = 'X'.
              EXIT.
            ENDLOOP.
            IF NOT G_FLAG IS INITIAL.
              CONCATENATE TEXT-064 TEXT-062
                           INTO G_POPUP_TEXT SEPARATED BY SPACE .
              CLEAR G_LINE_TEXT.
              PERFORM GET_POPUP_CONFIRM USING G_ANS
                                              G_POPUP_TEXT
                                              G_LINE_TEXT.
              IF G_ANS = C_ANS1.
                CLEAR G_ANS.
                PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
                TBCL3-TOP_LINE = 1.
                LEAVE TO SCREEN 9002.
               call screen 9002.
    End of DEVK939178
              ENDIF.
            ELSE.
              PERFORM EXISTING_SKU_BEFORE_DETAIL_SCR.
    Begin of DEVK939178
    Set top line of sku table to 1 and resolve nested screen calls
              TBCL3-TOP_LINE = 1.
              LEAVE TO SCREEN 9002.
             call screen 9002.
    End of DEVK939178
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    *endif.
    ENDFORM.                    " GOTO_SKU_HIER_SCREEN
    *&      Form  ADD_LINE_STR_GRP
          Add new entry to the store gropuing info
    FORM ADD_LINE_STR_GRP.
      G_OKCODE = OKCODE.
      CLEAR I_STORE_INFO.
      DESCRIBE TABLE I_STORE_INFO LINES L_LINE.
      DO 15 TIMES.
        I_STORE_INFO-LEVEL = C_LEVEL0.
        APPEND I_STORE_INFO.
        CLEAR I_STORE_INFO.
      ENDDO.
      G_ADD_CNT = G_ADD_CNT + 15.
      G_LINE_CNT = 1.
    ENDFORM.                    " ADD_LINE_STR_GRP
    *&      Form  DELETE_LINE_STR_GRP
    Delete selected entries which the user wants to perform a
    delete operation .
    FORM DELETE_LINE_STR_GRP.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
      IF I_STORE_INFO[] IS INITIAL.
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
    Check if any entry in the store info table is checked for the delete
    If selected, then issue a confirmation message to the user in pop-up
        READ TABLE I_STORE_INFO WITH KEY SEL = C_X.
        IF SY-SUBRC = 0.
          CLEAR G_POPUP_TEXT.
          CLEAR G_LINE_TEXT.
          G_POPUP_TEXT =  TEXT-065 .
          PERFORM GET_POPUP_CONFIRM USING G_ANS
                                          G_POPUP_TEXT
                                          G_LINE_TEXT .
    If the user opts 'Yes' then delete the selected lines
          IF G_ANS = C_ANS1.
            DELETE I_STORE_INFO WHERE SEL = C_X.
            MESSAGE S161(ZS) WITH TEXT-002.
          ENDIF.
        ELSE.
    Do the same deletion operation even if user does not select the line
    but puts the cursor in any line entry.
          GET CURSOR LINE L_LINE.
          IF SY-SUBRC = 0.
            L_LINE = L_LINE + TBCL_HEAD1-TOP_LINE - 1.
            CLEAR G_POPUP_TEXT.
            G_POPUP_TEXT =  TEXT-065.
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS
                                            G_POPUP_TEXT
                                           G_LINE_TEXT.
            IF G_ANS = C_ANS1.
              DELETE I_STORE_INFO INDEX L_LINE.
    Upon successful delete operation issue a success message to the user
              MESSAGE S161(ZS) WITH TEXT-002.
            ENDIF.
          ELSE.
            MESSAGE S161(ZS) WITH TEXT-006.
          ENDIF.
        ENDIF.
      ENDIF.
      DESCRIBE TABLE I_STORE_INFO LINES G_ADD_CNT.
    ENDFORM.                    " DELETE_LINE_STR_GRP
    *&      Form  SELECT_ALL_ENTRIES
    When the user selects the 'Select All' button, then select all the
    entries of the store grouping table by setting the SEL field to X for
    each entry
    FORM SELECT_ALL_ENTRIES.
      IF I_STORE_INFO[] IS INITIAL.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
        LOOP AT I_STORE_INFO .
          I_STORE_INFO-SEL = C_X.
          MODIFY I_STORE_INFO.
        ENDLOOP.
        G_OKCODE = OKCODE.
      ENDIF.
    ENDFORM.                    " SELECT_ALL_ENTRIES
    *&      Form  DESELECT_ALL_ENTRIES
          Deselect all the entries in the table
    FORM DESELECT_ALL_ENTRIES.
      IF I_STORE_INFO[] IS INITIAL.
    If the store grouping table is blank then issue message
    'No Entry is available for Selection.' .
        MESSAGE S161(ZS) WITH TEXT-001.
      ELSE.
        LOOP AT I_STORE_INFO .
          I_STORE_INFO-SEL = C_SPACE.
          MODIFY I_STORE_INFO.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " DESELECT_ALL_ENTRIES
    *&      Form  SAVE_PROMO
          Save the promo Event.
    FORM SAVE_PROMO.
      DATA: L_DATUM LIKE SY-DATUM,
            L_SUBRC LIKE SY-SUBRC .
    Populate dept/class/subclass if sku or style is not blank
      PERFORM POPULATE_DEPT_CLASS.
      DATA: G_PROMONO LIKE ZSDRETL_RMPHEAD-PP_ID.
      IF G_PROMO_CHG_FLAG = C_X.
        G_PROMONO = G_PROMO_ID.
      ELSE.
    Get number range for the promo
        CALL FUNCTION 'NUMBER_GET_NEXT'
             EXPORTING
                  NR_RANGE_NR   = C_NR_OBJ1
                  OBJECT        = C_NROBJ
                  QUANTITY      = '1'
                  IGNORE_BUFFER = C_X
             IMPORTING
                  NUMBER        = G_PROMONO.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      IF NOT G_PROMONO IS INITIAL.
        REFRESH I_RMPHEAD.
        CLEAR   WA_RMPHEAD.
    If Override flag is set for any SKU end that promo first
        READ TABLE I_SKU_INFO WITH KEY OVERRIDE = C_X.
        IF SY-SUBRC = 0.
         perform end_existing_promo .
        ENDIF.
    Populate Header information for Promo event
        REFRESH I_RMPHEAD.
        CLEAR   WA_RMPHEAD.
        IF SY-DYNNR = '9006'.
          WA_RMPHEAD-PP_ID = G_PROMONO.
          WA_RMPHEAD-ID_TYPE = C_P.
          WA_RMPHEAD-PLTYP = ZPRICELIST-ZLIST.
          WA_RMPHEAD-APPROVE = CHK_APR.
          WA_RMPHEAD-ERDAT = SY-DATUM.
          WA_RMPHEAD-ERNAM = SY-UNAME.
          WA_RMPHEAD-ID_DESC = G_PDESC.
          WA_RMPHEAD-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPHEAD-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPHEAD-CLEARANCE = C_SPACE.
          WA_RMPHEAD-PROMO_TYPE = G_PTYPE.
          APPEND WA_RMPHEAD TO I_RMPHEAD.
          CLEAR  WA_RMPHEAD.
        ELSE.
          WA_RMPHEAD-PP_ID = G_PROMONO.
          WA_RMPHEAD-ID_TYPE = C_P.
          WA_RMPHEAD-PLTYP = G_PRICELIST.
          WA_RMPHEAD-APPROVE = CHK_APR.
          WA_RMPHEAD-ERDAT = SY-DATUM.
          WA_RMPHEAD-ERNAM = SY-UNAME.
          WA_RMPHEAD-ID_DESC = G_PDESC.
          WA_RMPHEAD-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          L_SUBRC = 4.
          LOOP AT I_SKU_INFO.
            IF I_SKU_INFO-END_DATE GE ZSDRETL_RMPHEAD-START_DATE .
          if i_sku_info-end_date ge sy-datum.
              L_SUBRC = 0.
              EXIT.
            ENDIF.
          ENDLOOP.
          IF L_SUBRC = 4.
            L_DATUM = ZSDRETL_RMPHEAD-START_DATE - 1.
          l_datum = sy-datum - 1.
            WA_RMPHEAD-END_DATE = L_DATUM.
          ELSE.
            WA_RMPHEAD-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          ENDIF.
          WA_RMPHEAD-CLEARANCE = G_CHK_CLR.
          WA_RMPHEAD-PROMO_TYPE = G_PROMO_TYPE.
          APPEND WA_RMPHEAD TO I_RMPHEAD.
          CLEAR  WA_RMPHEAD.
        ENDIF.
        IF NOT I_RMPHEAD[] IS INITIAL.
          MODIFY ZSDRETL_RMPHEAD FROM TABLE I_RMPHEAD.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-067.
            COMMIT WORK.
          ENDIF.
        ENDIF.
    Populate Store information for Promo event
        REFRESH I_RMPSTORE.
        CLEAR   WA_RMPSTORE.
        IF SY-DYNNR = '9006' OR G_PROMO_PLTYP = C_X.
          WA_RMPSTORE-PP_ID = G_PROMONO.
          WA_RMPSTORE-RECNO = 0.
          WA_RMPSTORE-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPSTORE-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPSTORE-STORE_LEVEL = C_LEVEL6.
          WA_RMPDETAIL-ID_TYPE = C_P.
          WA_RMPDETAIL-PLTYP = G_PRICELIST.
          APPEND WA_RMPSTORE TO I_RMPSTORE.
          CLEAR WA_RMPSTORE.
        ELSE.
          LOOP AT I_STORE_INFO.
            WA_RMPSTORE-PP_ID = G_PROMONO.
            WA_RMPSTORE-RECNO = SY-TABIX.
            WA_RMPSTORE-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
            WA_RMPSTORE-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
            WA_RMPSTORE-REGION_ID = I_STORE_INFO-REGION_ID.
            WA_RMPSTORE-DIST_ID = I_STORE_INFO-DIST_ID.
            WA_RMPSTORE-AREA_ID = I_STORE_INFO-AREA_ID.
            WA_RMPSTORE-STORE_ID = I_STORE_INFO-STORE_ID.
            WA_RMPSTORE-ATTR_VAL = I_STORE_INFO-ATTR_VAL.
            WA_RMPSTORE-STORE_LEVEL = I_STORE_INFO-LEVEL.
            WA_RMPSTORE-ID_TYPE = C_P.
            WA_RMPSTORE-PLTYP = G_PRICELIST.
            APPEND WA_RMPSTORE TO I_RMPSTORE.
            CLEAR WA_RMPSTORE.
          ENDLOOP.
        ENDIF.
        IF NOT I_RMPSTORE[] IS INITIAL.
          IF NOT I_RMPSTORE_TEMP[] IS INITIAL.
            READ TABLE I_RMPSTORE_TEMP INTO WA_RMPSTORE INDEX 1.
            IF SY-SUBRC = 0.
              PERFORM ENQUEUE USING WA_RMPSTORE-PP_ID.
            ENDIF.
            DELETE ZSDRETL_RMPSTORE FROM TABLE I_RMPSTORE_TEMP.
            IF SY-SUBRC = 0.
              COMMIT WORK.
              PERFORM DEQUE.
              REFRESH I_RMPSTORE_TEMP.
            ENDIF.
          ENDIF.
          MODIFY ZSDRETL_RMPSTORE FROM TABLE I_RMPSTORE.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-066.
            COMMIT WORK.
          ENDIF.
        ENDIF.
    Populate SKU information for Promo event
        CLEAR: WA_RMPDETAIL , I_RMPDETAIL[].
        IF SY-DYNNR = '9006'.
          WA_RMPDETAIL-PP_ID = G_PROMONO.
          WA_RMPDETAIL-RECNO = 0.
          WA_RMPDETAIL-START_DATE = ZSDRETL_RMPHEAD-START_DATE.
          WA_RMPDETAIL-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
          WA_RMPDETAIL-VALUE = G_VAL_PLTYP.
          WA_RMPDETAIL-ZLEVEL = C_LEVEL1.
          APPEND WA_RMPDETAIL TO I_RMPDETAIL.
          CLEAR  WA_RMPDETAIL.
        ELSE.
          LOOP AT I_SKU_INFO.
            WA_RMPDETAIL-PP_ID = G_PROMONO.
            WA_RMPDETAIL-RECNO = SY-TABIX.
            WA_RMPDETAIL-START_DATE = I_SKU_INFO-START_DATE.
            IF ZSDRETL_RMPHEAD-END_DATE LT ZSDRETL_RMPHEAD-START_DATE.
          if zsdretl_rmphead-end_date lt sy-datum.
              WA_RMPDETAIL-END_DATE = ZSDRETL_RMPHEAD-END_DATE.
            ELSE.
              WA_RMPDETAIL-END_DATE = I_SKU_INFO-END_DATE.
            ENDIF.
            WA_RMPDETAIL-DEPT = I_SKU_INFO-DEPT.
            WA_RMPDETAIL-CLASS = I_SKU_INFO-CLASS.
            WA_RMPDETAIL-SUB_CLASS = I_SKU_INFO-SUB_CLASS.
            WA_RMPDETAIL-STYLE = I_SKU_INFO-STYLE.
            WA_RMPDETAIL-SKU = I_SKU_INFO-SKU.
            WA_RMPDETAIL-VALUE = I_SKU_INFO-VALUE.
            WA_RMPDETAIL-BASIC_PRICE = I_SKU_INFO-KBETR.
            WA_RMPDETAIL-ZLEVEL = I_SKU_INFO-TYPE.
            WA_RMPDETAIL-TOP_UP = I_SKU_INFO-TOP_UP.
            WA_RMPDETAIL-OVERRIDE = I_SKU_INFO-OVERRIDE.
            WA_RMPDETAIL-ZLEVEL = I_SKU_INFO-TYPE.
            WA_RMPDETAIL-REF_PROMO = I_SKU_INFO-REF_PROMO.
            WA_RMPDETAIL-ID_TYPE = C_P.
            WA_RMPDETAIL-PLTYP = G_PRICELIST.
            APPEND WA_RMPDETAIL TO I_RMPDETAIL.
            CLEAR  WA_RMPDETAIL.
          ENDLOOP.
        ENDIF.
        IF NOT I_RMPDETAIL[] IS INITIAL.
          IF NOT I_RMPDETAIL_TEMP[] IS INITIAL.
            READ TABLE I_RMPDETAIL_TEMP INTO WA_RMPDETAIL INDEX 1.
            IF SY-SUBRC = 0.
              PERFORM ENQUEUE USING WA_RMPDETAIL-PP_ID.
            ENDIF.
            DELETE ZSDRETL_RMPDETL FROM TABLE I_RMPDETAIL_TEMP.
            IF SY-SUBRC = 0.
              COMMIT WORK.
              PERFORM DEQUE.
              REFRESH I_RMPDETAIL_TEMP.
            ENDIF.
          ENDIF.
          MODIFY ZSDRETL_RMPDETL FROM TABLE I_RMPDETAIL.
          IF SY-SUBRC = 0.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
                 EXPORTING
                      PERCENTAGE = 0
                      TEXT       = TEXT-068.
            COMMIT WORK.
          ENDIF.
        ENDIF.
        IF SY-SUBRC = 0.
          IF G_PROMO_CHG_FLAG = C_X.
            MESSAGE S161(ZS)
                 WITH TEXT-046 G_PROMONO TEXT-048.
          ELSE.
            MESSAGE S161(ZS)
                   WITH TEXT-046 G_PROMONO TEXT-049.
          ENDIF.
          LEAVE TO SCREEN 9000.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SAVE_PROMO
    *&      Form  EXIT_FROM_HEADER_SCREEN
          Exit from header screen
    FORM EXIT_FROM_HEADER_SCREEN.
    in case of view promo and view pricing , come back to the view/copy
    screen
      IF G_MAIN_OKCODE = 'VRPR' AND (  G_PROMO_VIEW_FLAG = C_X
                                    OR G_PRICING_VIEW_FLAG = C_X ).
        LEAVE TO SCREEN 9007.
      ELSE.
    if store grouping info table is empty then come back to the main menu
        IF I_STORE_INFO[] IS INITIAL.
          LEAVE TO SCREEN 9000.
        ELSE.
    if store grouping info contains a blank record then come to main menu
          READ TABLE I_STORE_INFO INDEX 1.
          IF SY-SUBRC = 0 AND I_STORE_INFO-REGION_ID IS INITIAL
                          AND I_SKU_INFO[] IS INITIAL.
            LEAVE TO SCREEN 9000.
          ENDIF.
    if SKU info table is blank then issue message if the user wants to
    exit from the header screen without entring the promo/pricing detail
          IF I_SKU_INFO[] IS INITIAL.
            CLEAR G_ANS .
            IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
              G_POPUP_TEXT = TEXT-069.
            ELSE.
              G_POPUP_TEXT = TEXT-070.
            ENDIF.
    Call FM for pop-up message
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
            IF G_ANS = C_ANS1.
              LEAVE TO SCREEN 9000.
            ENDIF.
          ELSE.
    if sku info is avilable & user presses exit then a message is issued
    if the user wants to leave without saving the promo/pricing event
            CLEAR G_ANS .
            IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
              G_POPUP_TEXT = TEXT-071.
            ELSE.
              G_POPUP_TEXT = TEXT-072.
            ENDIF.
    Call FM for pop-up message
            CLEAR G_LINE_TEXT.
            PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
    If user presses 'Yes' then go back to the main menu
            IF G_ANS = C_ANS1.
              LEAVE TO SCREEN 9000.
    if user pressed 'No' then prompts the message if the user wants to go
    back without saving if it says 'Yes' , then go to the main menu and if
    it says 'No' then save the event and go back to main menu
            ELSEIF G_ANS = C_ANS2.
              CLEAR G_ANS .
                 message s161(zs) with text-164.
                 exit.
             IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
               G_POPUP_TEXT = TEXT-073.
             ELSE.
               G_POPUP_TEXT = TEXT-074.
             ENDIF.
    Call FM for pop-up message
             CLEAR G_LINE_TEXT.
           PERFORM GET_POPUP_CONFIRM USING G_ANS G_POPUP_TEXT G_LINE_TEXT.
             IF G_ANS = C_ANS1.
               IF G_MAIN_OKCODE = 'CRPR' OR G_MAIN_OKCODE = 'PRCC'.
    Call save pricing subroutine to save the pricing event
                 MESSAGE S161(ZS) WITH TEXT-164.
                 perform save_pricing.
               ELSE.
    Call save promo subroutine to save the promo event
                 perform save_promo.
                 MESSAGE S161(ZS) WITH TEXT-164.
               ENDIF.
             ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " EXIT_FROM_HEADER_SCREEN
    *&      Form  VIEW_PROMOS
      Call subroutine to view all the pre-existing promos that are
      available for the selected lines
    FORM VIEW_PROMOS.
      CASE SY-DYNNR.
        WHEN '9001'.
          G_DYNNR = SY-DYNNR.
    Display all the promo that are already exist for the selected entries
    in store grouping table
    Begin of DEVK939178
    logic is changed to check if any existing promo available with higher
    store hierarchy
          PERFORM VIEW_PRE_PROMO_STRGRP.
    End of DEVK939178
        WHEN '9002'.
          G_DYNNR = SY-DYNNR.
    Display all the promo that are already exist for the selected entries
    in sku hierarchy table
    Begin of DEVK939196
          PERFORM VIEW_PROMO_FOR_SKUHIER1 .
    End of DEVK939196
      ENDCASE.
    ENDFORM.                    " VIEW_PROMOS
    *&      Form  VIEW_PRICING
          View the existing pricing if available for an entry
    FORM VIEW_PRICING.
      CASE SY-DYNNR.
        WHEN '9001'.
          G_DYNNR = SY-DYNNR.
    Display all the pricings that are already exist for  selected entries
    in store grouping table
          PERFORM VIEW_PRE_PROMO_STRGRP .
        WHEN '9002'.
          G_DYNNR = SY-DYNNR.
    Display all the pricings that are already exist for  selected entries
    in sku hierarchy table
          PERFORM VIEW_PROMO_FOR_SKUHIER1.
      ENDCASE.
    ENDFORM.                    " VIEW_PRICING
    *&      Form  VIEW_PROMO_FOR_STRGRP
          Prepare the ALV scenarios to display the existing promos
    FORM VIEW_PROMO_FOR_STRGRP.
      REFRESH I_FIELDCAT.
      CLEAR   I_FIELDCAT.
    Populate the field catalogue table for Stor grouping fields
      PERFORM POPULATE_CATALOGUE USING:
    Position       Fieldname  Tablename  Title              Display
       '01'          'REGION_ID'    'I_STR_GRP1'    TEXT-075     ' ',
       '02'          'DIST_ID'      'I_STR_GRP1'    TEXT-076     ' ',
       '03'          'AREA_ID'      'I_STR_GRP1'    TEXT-077     ' ',
       '04'          'ATTR_VAL'     'I_STR_GRP1'    TEXT-078     ' ',
       '05'          'STORE_ID'     'I_STR_GRP1'    TEXT-079     ' ',
       '06'          'PP_ID'        'I_STR_GRP1'    TEXT-084     ' ',
       '07'          'START_DATE'   'I_STR_GRP1'    TEXT-082     ' ',
       '08'          'END_DATE'     'I_STR_GRP1'    TEXT-083     ' ',
       '09'          'PROMO_TYPE'   'I_STR_GRP1'    TEXT-080     ' ',
       '10'          'CLEARANCE'    'I_STR_GRP1'    TEXT-081     ' ',
       '11'          'ID_DESC'      'I_STR_GRP1'    TEXT-161     ' '.
      LOOP AT I_FIELDCAT INTO STRUCT_CAT.
        CASE STRUCT_CAT-FIELDNAME.
          WHEN 'PROMO_TYPE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-NO_OUT = C_SPACE.
            ELSE.
              STRUCT_CAT-NO_OUT = C_X.
            ENDIF.
          WHEN 'CLEARANCE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-NO_OUT = C_SPACE.
            ELSE.
              STRUCT_CAT-NO_OUT = C_X.
            ENDIF.
          WHEN 'START_DATE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-082.
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-085.
            ENDIF.
          WHEN 'END_DATE'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-083.
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-086.
            ENDIF.
          WHEN 'PP_ID'.
            IF G_PROMO_FLAG = C_X.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-084 .
            ELSE.
              STRUCT_CAT-REPTEXT_DDIC = TEXT-088.
            ENDIF.
        ENDCASE.
        MODIFY I_FIELDCAT FROM STRUCT_CAT INDEX SY-TABIX.
      ENDLOOP.
      CLEAR STRUCT_LAYOUT.
      STRUCT_LAYOUT-COLWIDTH_OPTIMIZE = C_X.
      IF G_PROMO_FLAG = C_X.
        STRUCT_LAYOUT-WINDOW_TITLEBAR   = TEXT-089.
      ELSE.
        STRUCT_LAYOUT-WINDOW_TITLEBAR   = TEXT-090.
      ENDIF.
      STRUCT_LAYOUT-ZEBRA = C_X.
    Populate sort table
      PERFORM POPULATE_SORT_TABLE.
    populate event table
      PERFORM POPULATE_EVENT_TABLE.
    Call function to display the list of existing promos in ALV format
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM = G_REPID
                IS_LAYOUT          = STRUCT_LAYOUT
                IT_FIELDCAT        = I_FIELDCAT
                IT_SORT            = I_SORTTAB[]
                IT_EVENTS          = I_EVENT[]
           TABLES
                T_OUTTAB           = I_STR_GRP1
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " VIEW_PROMO_FOR_STRGRP
    *&      Form  POPULATE_CATALOGUE
          Populating general informations for output format
         -->p_position     Column position
         -->p_fname        Field name
         -->p_tabname      Internal table name
         -->p_title        Title
         -->p_display      Display/No display
    FORM POPULATE_CATALOGUE USING    P_POSITION TYPE SYCUCOL
                                     P_FNAME    TYPE FIELDNAME
                                     P_TABNAME  TYPE TABNAME
                                     P_TITLE    TYP

    Hi sahil,
    probably one or more fields used for comparison in for all entries where clause is not part of the refered table. The error is given for one of your for all entries select - I don't know which one it was. Check this condition: Are all fields like i.e. I_SKU_HIER-PP_ID parts of the used tables?
    Maybe ther is a typo.
    Regards,
    Clemens

  • Give me some brief introduction on ABAP

    Hi all
    Give me some brief introduction on ABAP

    Hi
    Welcome to SDN
    ABAP is one of many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting. ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the German meaning of "generic report preparation processor", but was later renamed to Advanced Business Application Programming. ABAP was one of the first languages to include the concept of Logical Databases (LDBs), which provides a high level of abstraction from the basic database level.
    The ABAP programming language was originally used by SAP developers to develop the SAP R/3 platform. It was also intended to be used by SAP customers to enhance SAP applications – customers can develop custom reports and interfaces with ABAP programming. The language is fairly easy to learn for programmers but it is not a tool for direct use by non-programmers. Good programming skills, including knowledge of relational database design and preferably also of object-oriented concepts, are required to create ABAP programs.
    ABAP remains the language for creating programs for the client-server R/3 system, which SAP first released in 1992. As computer hardware evolved through the 1990s, more and more of SAP's applications and systems were written in ABAP. By 2001, all but the most basic functions were written in ABAP. In 1999, SAP released an object-oriented extension to ABAP called ABAP Objects, along with R/3 release 4.6.
    SAP's most recent development platform, NetWeaver, supports both ABAP and Java.
    Implementation
    Where does the ABAP Program Run?
    All ABAP programs reside inside the SAP database. They are not stored in separate external files like Java or C++ programs. In the database all ABAP code exists in two forms: source code, which can be viewed and edited with the ABAP workbench, and "compiled" code ("generated" code is the more correct technical term), which is loaded and interpreted by the ABAP runtime system. Code generation happens implicitly when a unit of ABAP code is first invoked. If the source code is changed later or if one of the data objects accessed by the program has changed (e.g. fields were added to a database table), then the code is automatically regenerated.
    ABAP programs run in the SAP application server, under control of the runtime system, which is part of the SAP kernel. The runtime system is responsible for processing ABAP statements, controlling the flow logic of screens and responding to events (such as a user clicking on a screen button). A key component of the ABAP runtime system is the Database Interface, which turns database-independent ABAP statements ("Open SQL") into statements understood by the underlying DBMS ("Native SQL"). The database interface handles all the communication with the relational database on behalf of ABAP programs; it also contains extra features such as buffering of frequently accessed data in the local memory of the application server.
    Basis
    Basis sits between ABAP/4 and Operating system.Basis is like an operating system for R/3. It sits between the ABAP/4 code and the computer's operating system. SAP likes to call it middleware because it sits in the middle, between ABAP/4 and the operating system. Basis sits between ABAP/4 and the operating system. ABAP/4 cannot run directly on an operating system. It requires a set of programs (collectively called Basis) to load, interpret, and buffer its input and output. Basis, in some respects, is like the Windows environment. Windows starts up, and while running it provides an environment in which Windows programs can run. Without Windows, programs written for the Windows environment cannot run. Basis is to ABAP/4 programs as Windows is to Windows programs. Basis provides the runtime environment for ABAP/4 programs. Without Basis, ABAP/4 programs cannot run. When the operator starts up R/3, you can think of him as starting up Basis. Basis is a collection of R/3 system programs that present you with an interface. Using this interface the user can start ABAP/4 programs. To install Basis, an installer runs the program r3inst at the command-prompt level of the operating system. Like most installs, this creates a directory structure and copies a set of executables into it. These executables taken together as a unit form Basis.
    To start up the R/3 system, the operator enters the startsap command. The Basis executables start up and stay running, accepting requests from the user to run ABAP/4 programs.
    ABAP/4 programs run within the protective Basis environment; they are not executables that run on the operating system. Instead, Basis reads ABAP/4 code and interprets it into operating system instructions. ABAP/4 programs do not access operating system functions directly. Instead, they use Basis functions to perform file I/O and display data in windows. This level of isolation from the operating system enables ABAP/4 programs to be ported without modification to any system that supports R/3. This buffering is built right into the ABAP/4 language itself and is actually totally transparent to the programmer.
    Basis makes ABAP/4 programs portable. The platforms that R/3 can run on are shown in Table. For example, if you write an ABAP/4 program on Digital UNIX with an Informix database and an OSF/Motif interface, that same program should run without modification on a Windows NT machine with an Oracle database and a Windows 95 interface. Or, it could run on an AS/400 with a DB2 database using OS/2 as the front-end.
    SAP also provides a suite of tools for administering the Basis system. These tools perform tasks such as system performance monitoring, configuration, and system maintenance. To access the Basis administration tools from the main menu, choose the path Tools->Administration.
    Platforms and Databases Supported by R/3
    Operating Systems Supported Hardware Supported Front-Ends Supported Databases
    AIX SINIX IBM SNI SUN Win 3.1/95/NT DB2 for AIX
    SOLARIS HP-UX Digital HP OSF/Motif Informix-Online
    Digital-UNIX Bull OS/2 Oracle 7.1
    Windows NT AT&T Compaq Win 3.1/95/NT Oracle 7.1
    Bull/Zenith OSF/Motif SQL Server 6.0
    HP (Intel) SNI OS/2 ADABAS D
    OS/400 AS/400 Win95 OS/2 DB2/400
    SAP Systems and Landscapes
    All SAP data exists and all SAP software runs in the context of an SAP system. A system consists of a central relational database and one or more application servers ("instances") accessing the data and programs in this database. A SAP system contains at least one instance but may contain more, mostly for reasons of sizing and performance. In a system with multiple instances, load balancing mechanisms ensure that the load is spread evenly over the available application servers.
    Installations of the Web Application Server (landscapes) typically consist of three systems: one for development, one for testing and quality assurance, and one for production. The landscape may contain more systems, e.g. separate systems for unit testing and pre-production testing, or it may contain fewer, e.g. only development and production, without separate QA; nevertheless three is the most common configuration. ABAP programs are created and undergo first testing in the development system. Afterwards they are distributed to the other systems in the landscape. These actions take place under control of the Change and Transport System (CTS), which is responsible for concurrency control (e.g. preventing two developers from changing the same code at the same time), version management and deployment of programs on the QA and production systems.
    The Web Application Server consists of three layers: the database layer, the application layer and the presentation layer. These layers may run on the same or on different physical machines. The database layer contains the relational database and the database software. The application layer contains the instance or instances of the system. All application processes, including the business transactions and the ABAP development, run on the application layer. The presentation layer handles the interaction with users of the system. Online access to ABAP application servers can go via a proprietary graphical interface, the SAPGUI, or via a Web browser.
    Transactions
    We call an execution of an ABAP program using a transaction code a transaction. There are dialog, report, parameter, variant, and as of release 6.10, OO transactions. A transaction is started by entering the transaction code in the input field on the standard toolbar, or by means of the ABAP statements CALL TRANSACTION or LEAVE TO TRANSACTION. Transaction codes can also be linked to screen elements or menu entries. Selecting such an element will start the transaction.
    A transaction code is simply a twenty-character name connected with a Dynpro, another transaction code, or, as of release 6.10, a method of an ABAP program. Transaction codes linked with Dynpros are possible for executable programs, module pools, and function groups. Parameter transactions and variant transactions are linked with other transaction codes. Transaction codes that are linked with methods are allowed for all program types that can contain methods. Transaction codes are maintained in transaction SE93.
    So, a transaction is nothing more than the SAP way of program execution—but why is it called “transaction”? ABAP is a language for business applications and the most important features of business applications were and still are are transactions. Since in the early days of SAP, the execution of a program often meant the same thing as carrying out a business transaction, the terms transaction and transaction code were chosen for program execution. But never mix up the technical meaning of a transaction with business transactions. For business transactions, it is the term LUW (Logical Unit of Work) that counts. And during one transaction (program execution), there can be many different LUW’s.
    Let’s have a look at the different kind of transactions:
    Dialog Transaction
    These are the most common kind of transactions. The transaction code of a dialog transaction is linked to a Dynpro of an ABAP program. When the transaction is called, the respective program is loaded and the Dynpro is called. Therefore, a dialog transaction calls a Dynpro sequence rather than a program. Only during the execution of the Dynpro flow logic are the dialog modules of the ABAP program itself are called. The program flow can differ from execution to execution. You can even assign different dialog transaction codes to one program.
    Parameter Transaction
    In the definition of a parameter transaction code, a dialog transaction is linked with parameters. When you call a parameter transaction, the input fields of the initial Dynpro screen of the dialog transaction are filled with parameters. The display of the initial screen can be inhibited by specifying all mandatory input fields as parameters of the transaction.
    Variant Transaction
    In the definition of a variant transaction code, a dialog transaction is linked with a transaction variant. When a variant transaction is accessed, the dialog transaction is called and executed with the transaction variant. In transaction variants, you can assign default values to the input fields on several Dynpro screens in a transaction, change the attributes of screen elements, and hide entire screens. Transaction variants are maintained in transaction SHD0.
    Report Transaction
    A report transaction is the transaction code wrapping for starting the reporting process. The transaction code of a report transaction must be linked with the selection screen of an executable program. When you execute a report transaction, the runtime environment internally executes the ABAP statement SUBMIT—more to come on that.
    OO Transaction
    A new kind of transaction as of release 6.10. The transaction code of an OO transaction is linked with a method of a local or global class. When the transaction is called, the corresponding program is loaded, for instance methods an object of the class is generated and the method is executed.
    Types of ABAP programs
    In ABAP, there are two different types of programs:
    Report programs(Executable pools)
    A Sample ReportReport programs AKA Executable pools follow a relatively simple programming model whereby a user optionally enters a set of parameters (e.g. a selection over a subset of data) and the program then uses the input parameters to produce a report in the form of an interactive list. The output from the report program is interactive because it is not a passive display; instead it enables the user, through ABAP language constructs, to obtain a more detailed view on specific data records via drill-down functions, or to invoke further processing through menu commands, for instance to sort the data in a different way or to filter the data according to selection criteria. This method of presenting reports has great advantages for users who must deal with large quantities of information and must also have the ability to examine this information in highly flexible ways, without being constrained by the rigid formatting or unmanageable size of "listing-like" reports. The ease with which such interactive reports can be developed is one of the most striking features of the ABAP language.
    The term "report" is somewhat misleading in the sense that it is also possible to create report programs that modify the data in the underlying database instead of simply reading it.
    A customized screen created using Screen Painter,which is one of the tool available in ABAP workbench(T-code = SE51).
    Online programs
    Online programs (also called module pools) do not produce lists. These programs define more complex patterns of user interaction using a collection of screens. The term “screen” refers to the actual, physical image that the users sees. Each screen also has a “flow logic”; this refers to the ABAP code invoked by the screens, i.e. the logic that initializes screens, responds to a user’s requests and controls the sequence between the screens of a module pool. Each screen has its own Flow Logic, which is divided into a "PBO" (Process Before Output) and "PAI" (Process After Input) section. In SAP documentation the term “dynpro” (dynamic program) refers to the combination of the screen and its Flow Logic.
    Online programs are not invoked directly by their name, but are associated with a transaction code. Users can then invoke them through customizable, role-dependent, transaction menus.
    Apart from reports and online programs, it is also possible to develop sharable code units such as class libraries, function libraries and subroutine pools.
    Subroutine Pools
    Subroutine pools, as the name implies, were created to contain selections of subroutines that can be called externally from other programs. Before release 6.10, this was the only way subroutine pools could be used. But besides subroutines, subroutine pools can also contain local classes and interfaces. As of release 6.10, you can connect transaction codes to methods. Therefore, you can now also call subroutine pools via transaction codes. This is the closest to a Java program you can get in ABAP: a subroutine pool with a class containing a method – say – main connected to a transaction code!
    Type Pools
    Type pools are the precursors to general type definitions in the ABAP Dictionary. Before release 4.0, only elementary data types and flat structures could be defined in the ABAP Dictionary. All other types that should’ve been generally available had to be defined with TYPES in type pools. As of release 4.0, type pools were only necessary for constants. As of release 6.40, constants can be declared in the public sections of global classes and type pools can be replaced by global classes.
    Class Pools
    Class pools serve as containers for exactly one global class. Besides the global class, they can contain global types and local classes/interfaces to be used in the global class. A class pool is loaded into memory by using one of its components. For example, a public method can be called from any ABAP program or via a transaction code connected to the method. You maintain class pools in the class builder.
    Interface Pools
    Interface pools serve as containers for exactly one global interface—nothing more and nothing less. You use an interface pool by implementing its interface in classes and by creating reference variables with the type of its interface. You maintain interface pools in the class builder.
    ABAP Workbench
    The ABAP Workbench contains different tools for editing Repository objects. These tools provide you with a wide range of assistance that covers the entire software development cycle. The most important tools for creating and editing Repository objects are:
    ABAP Editor for writing and editing program code
    ABAP Dictionary for processing database table definitions and retrieving global types
    Menu Painter for designing the user interface (menu bar, standard toolbar, application toolbar, function key assignment)
    Screen Painter for designing screens (dynamic programs) for user dialogs
    Function Builder for displaying and processing function modules (routines with defined interfaces that are available throughout the system)
    Class Builder for displaying and processing ABAP Objects classes
    The ABAP Dictionary
    Enforces data integrity
    Manages data definitions without redundancy
    Is tightly integrated with the rest of the ABAP/4 Development Workbench.
    Enforcing data integrity is the process of ensuring that data entered into the system is logical, complete, and consistent. When data integrity rules are defined in the ABAP/4 Dictionary, the system automatically prevents the entry of invalid data. Defining the data integrity rules at the dictionary level means they only have to be defined once, rather than in each program that accesses that data.
    The following are examples of data lacking integrity:
    A date field with a month value of 13
    An order assigned to a customer number that doesn’t exist
    An order not assigned to a customer
    Managing data definitions without redundancy is the process of linking similar information to the same data definition. For example, a customer database is likely to contain a customer’s ID number in several places. The ABAP Dictionary provides the capability of defining the characteristics of a customer ID number in only one place. That central definition then can be used for each instance of a customer ID number.
    The ABAP Dictionary’s integration with the rest of the development environment enables ABAP programs to automatically recognize the names and characteristics of dictionary objects.
    Additionally, the system provides easy navigation between development objects and dictionary definitions. For example, as a programmer, you can double-click on the name of a dictionary object in your program code, and the system will take you directly to the definition of that object in the ABAP/4 Dictionary.
    When a dictionary object is changed, a program that references the changed object will automatically reference the new version the next time the program runs. Because ABAP is interpreted, it is not necessary to recompile programs that reference changed dictionary objects.
    ABAP Syntax
    The syntax of the ABAP programming language consists of the following elements:
    Statements
    An ABAP program consists of individual ABAP statements. Each statement begins with a keyword and ends with a period.
    "Hello World" PROGRAM
    WRITE 'Hello World'.
    This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".
    The keyword determines the category of the statement. For an overview of the different categories, refer to ABAP Statements.
    Formatting ABAP Statements
    ABAP has no format restrictions. You can enter statements in any format, so a statement can be indented, you can write several statements on one line, or spread a single statement over several lines.
    You must separate words within a statement with at least one space. The system also interprets the end of line marker as a space.
    The program fragment
    PROGRAM TEST.
    WRITE 'This is a statement'.
    could also be written as follows:
    PROGRAM TEST. WRITE 'This is a statement'.
    or as follows:
    PROGRAM
    TEST.
    WRITE
    'This is a statement'.
    Use this free formatting to make your programs easier to understand.
    Special Case: Text Literals
    Text literals are sequences of alphanumeric characters in the program code that are enclosed in quotation marks. If a text literal in an ABAP statement extends across more than one line, the following difficulties can occur:
    All spaces between the quotation marks are interpreted as belonging to the text literal. Letters in text literals in a line that is not concluded with quotation marks are interpreted by the editor as uppercase. If you want to enter text literals that do not fit into a single line, you can use the ‘&’ character to combine a succession of text literals into a single one.
    The program fragment
    PROGRAM TEST.
    WRITE 'This
    is
    a statement'.
    inserts all spaces between the quotation marks into the literal, and converts the letters to uppercase.
    This program fragment
    PROGRAM TEST.
    WRITE 'This' &
    ' is ' &
    'a statement'.
    combines three text literals into one.
    Chained Statements
    The ABAP programming language allows you to concatenate consecutive statements with an identical first part into a chain statement.
    To concatenate a sequence of separate statements, write the identical part only once and place a colon ( after it. After the colon, write the remaining parts of the individual statements, separating them with commas. Ensure that you place a period (.) after the last part to inform the system where the chain ends.
    Statement sequence:
    WRITE SPFLI-CITYFROM.
    WRITE SPFLI-CITYTO.
    WRITE SPFLI-AIRPTO.
    Chain statement:
    WRITE: SPFLI-CITYFROM, SPFLI-CITYTO, SPFLI-AIRPTO.
    In the chain, a colon separates the beginning of the statement from the variable parts. After the colon or commas, you can insert any number of spaces.
    You could, for example, write the same statement like this:
    WRITE: SPFLI-CITYFROM,
    SPFLI-CITYTO,
    SPFLI-AIRPTO.
    In a chain statement, the first part (before the colon) is not limited to the keyword of the statements.
    Statement sequence:
    SUM = SUM + 1.
    SUM = SUM + 2.
    SUM = SUM + 3.
    SUM = SUM + 4.
    Chain statement:
    SUM = SUM + : 1, 2, 3, 4.
    Comments
    Comments are texts that you can write between the statements of your ABAP program to explain their purpose to a reader. Comments are distinguished by the preceding signs * (at the beginning of a line) and " (at any position in a line). If you want the entire line to be a comment, enter an asterisk (*) at the beginning of the line. The system then ignores the entire line when it generates the program. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. The system interprets comments indicated by double quotation marks as spaces.
    PROGRAM SAPMTEST *
    WRITTEN BY KARL BYTE, 06/27/1995 *
    LAST CHANGED BY RITA DIGIT, 10/01/1995 *
    TASK: DEMONSTRATION *
    PROGRAM SAPMTEST.
    DECLARATIONS *
    DATA: FLAG " GLOBAL FLAG
    NUMBER TYPE I " COUNTER
    PROCESSING BLOCKS *
    Advantages of ABAP over Contemporary languages
    ABAP OBJECTS
    Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
    ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
    ABAP Statements – an Overview
    The first element of an ABAP statement is the ABAP keyword. This determines the category of the statement. The different statement categories are as follows:
    Declarative Statements
    These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.
    Examples of declarative keywords:
    TYPES, DATA, TABLES
    Modularization Statements
    These statements define the processing blocks in an ABAP program.
    The modularization keywords can be further divided into:
    · Defining keywords
    You use statements containing these keywords to define subroutines, function modules, dialog modules and methods. You conclude these processing blocks using the END statements.
    Examples of definitive keywords:
    METHOD ... ENDMETHOD, FUNCTION ... ENDFUNCTION, MODULE ... ENDMODULE.
    · Event keywords
    You use statements containing these keywords to define event blocks. There are no special statements to conclude processing blocks - they end when the next processing block is introduced.
    Examples of event key words:
    AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMAND
    Control Statements
    You use these statements to control the flow of an ABAP program within a processing block according to certain conditions.
    Examples of control keywords:
    IF, WHILE, CASE
    Call Statements
    You use these statements to call processing blocks that you have already defined using modularization statements. The blocks you call can either be in the same ABAP program or in a different program.
    Examples of call keywords:
    CALL METHOD, CALL TRANSACTION, SUBMIT, LEAVE TO
    Operational Statements These keywords process the data that you have defined using declarative statements.
    Examples of operational keywords:
    MOVE, ADD
    Unique Concept of Internal Table in ABAP
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
    Internal Tables as Data Types
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    Line type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    Generic Internal Tables
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
    Internal Tables as Dynamic Data Objects
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    Choosing a Table Type
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    Advanced Topics
    Batch Input: Concepts
    Processing Sessions
    The above figure shows how a batch input session works.A batch input session is a set of one or more calls to transactions along with the data to be processed by the transactions. The system normally executes the transactions in a session non-interactively, allowing rapid entry of bulk data into an R/3 System.
    A session records transactions and data in a special format that can be interpreted by the R/3 System. When the System reads a session, it uses the data in the session to simulate on-line entry of transactions and data. The System can call transactions and enter data using most of the facilities that are available to interactive users.
    For example, the data that a session enters into transaction screens is subject to the same consistency checking as in normal interactive operation. Further, batch input sessions are subject to the user-based authorization checking that is performed by the system.
    Advantages of ABAP over Contemporary languages
    ABAP Objects offers a number of advantages, even if you want to continue using procedural programming. If you want to use new ABAP features, you have to use object-oriented interfaces anyway.
    Sharing Data: With ABAP shared objects, you can aggregate data once at a central location and the different users and programs can then access this data without the need for copying.
    Exception Handling: With the class-based exception concept of ABAP, you can define a special control flow for a specific error situation and provide the user with information about the error.
    Developing Persistency: For permanent storage of data in ABAP, you use relational database tables by means of database-independent Open SQL, which is integrated in ABAP. However, you can also store selected objects transparently or access the integrated database or other databases using proprietary SQL.
    Connectivity and Interoperability: The Exchange Infrastructure and Web services are the means by which developers can implement a service-oriented architecture. With Web services, you can provide and consume services independently of implementation or protocol. Furthermore, you can do so within NetWeaver and in the communication with other systems. With the features of the Exchange Infrastructure, you can enable, manage, and adapt integration scenarios between systems.
    Making Enhancements: With the Enhancement Framework, you can enhance programs, function modules, and global classes without modification as well as replace existing code. The Switch Framework enables you activate only specific development objects or enhancements in a system.
    Considerable Aspects
    It follows a list of aspects to be considered during development. The list of course is not complete.
    Dynpro persistence
    When implementing dynpros one has to care for himself to read out and persist the necessary fields. Recently it happened to me that I forgot to include a field into the UPDATE-clause which is an error not so easy to uncover if you have other problems to be solved in the same package. Here, tool-support or built-in mechanisms would help.
    The developer could help himself out by creating something like a document containing a cookbook or guide in which parts of a dynpro logic one has to care about persistence. With that at hand, it would be quite easy finding those bugs in short time. Maybe a report scanning for the definition of the dynpro fields to be persisted could scan the code automatically, too.
    Memory Cache
    It should be common-sense that avoiding select-statements onto the database helps reducing the server load. For that the programmer either can resort to function modules if available. This maybe is the case for important tables. Or the programmer needs to implement his own logic using internal tables. Here, the standard software package could provide the developer with a tool or a mechanism auto-generating memory cached tables resp. function modules implementing this.
    Sometimes buffering of database tables could be used, if applicable. But that would require an effort in customizing the system and could drain down system performance overall, especially if a table is involved that has a central role.
    Interfaces
    It should be noticed that some function modules available have an incomplete interface. That means, the interface does not include all parameters evaluated by the logic of the function module. For example, global variables from within the function group could be read out, which cannot be influenced by the general caller. Or memory parameters are used internally to feed the logic with further information.
    One workaround here would be copying the relevant parts of the logic to a newly created function module and then adapt it to the own context. This sometimes is possible, maybe if the copied code is not too lengthy and only a few or no calls to other logic is part of it.
    A modification of the SAP code could be considered, if the modification itself is unavoidable (or another solution would be not justifiable by estimated effort to spend on it) and if the location of the modification seems quite safe against future upgrades or hot fixes. The latter is something that could be evaluated by contacting the SAP hotline or working with OSS message (searching thru existing one, perhaps open a new one).
    Example
    'From SAP NetWeaver:'
    set an exclusive lock at level object-type & object-id
    IF NOT lf_bapi_error = true.
    IF ( NOT istourhd-doc_type IS INITIAL ) AND
    ( NOT istourhd-doc_id IS INITIAL )
    CALL FUNCTION 'ENQUEUE_/DSD/E_HH_RAREF'
    EXPORTING
    obj_typ = istourhd-doc_type
    obj_id = istourhd-doc_id
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    terminate processing...
    lf_bapi_error = true.—
    ...and add message to return table
    PERFORM set_msg_to_bapiret2
    USING sy-msgid gc_abort sy-msgno
    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    gc_istourhd gc_enqueue_refdoc space
    CHANGING lt_return.
    ENDIF.
    ENDIF.
    ENDIF. " bapi error
    Example Report(Type - ALV(Advanced List Viewer))
    REPORT Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB .
    *Simple example to use ALV and to define the ALV data in an internal
    *table
    *data definition
    tables:
    marav. "Table MARA and table MAKT
    Data to be displayed in ALV
    Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
    matically determine the fieldstructure from this source program
    Data:
    begin of imat occurs 100,
    matnr like marav-matnr, "Material number
    maktx like marav-maktx, "Material short text
    matkl like marav-matkl, "Material group (so you can test to make
    " intermediate sums)
    ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
    "make sums)
    gewei like marav-gewei, "weight unit (just to be complete)
    end of imat.
    Other data needed
    field to store report name
    data i_repid like sy-repid.
    field to check table length
    data i_lines like sy-tabix.
    Data for ALV display
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    select-options:
    s_matnr for marav-matnr matchcode object MAT1.
    start-of-selection.
    read data into table imat
    select * from marav
    into corresponding fields of table imat
    where
    matnr in s_matnr.
    Check if material was found
    clear i_lines.
    describe table imat lines i_lines.
    if i_lines lt 1.
    Using hardcoded write here for easy upload
    write: /
    'No materials found.'.
    exit.
    endif.
    end-of-selection.
    To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
    The fieldcatalouge can be generated by FUNCTION
    'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
    report source, including this report.
    Store report name
    i_repid = sy-repid.
    Create Fieldcatalogue from internal table
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = i_repid
    I_INTERNAL_TABNAME = 'IMAT' "capital letters!
    I_INCLNAME = i_repid
    CHANGING
    CT_FIELDCAT = int_fcat
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3.
    *explanations:
    I_PROGRAM_NAME is the program which calls this function
    I_INTERNAL_TABNAME is the name of the internal table which you want
    to display in ALV
    I_INCLNAME is the ABAP-source where the internal table is defined
    (DATA....)
    CT_FIELDCAT contains the Fieldcatalouge that we need later for
    ALV display
    IF SY-SUBRC <> 0.
    write: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
    ENDIF.
    *This was the fieldcatlogue
    Call for ALV list display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = i_repid
    IT_FIELDCAT = int_fcat
    TABLES
    T_OUTTAB = imat
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    *explanations:
    I_CALLBACK_PROGRAM is the program which calls this function
    IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
    now the data definition needed for display
    I_SAVE allows the user to save his own layouts
    T_OUTTAB contains the data to be displayed in ALV
    IF SY-SUBRC <> 0.
    write: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
    ENDIF.
    Reward points for useful Answers
    Regards
    Anji

  • I am looking for an App that gives me some graphics to title pages and margins in word documents

    I am looking for an App that gives me some graphics for Word 2011 title pages, and margins.  A range of screen backgrounds for the page would be useful as my word documents are sent mostly online. ...appropriate for business  topics.

    I use documents to go and find that it works very will. It also has a desktop program that will allow for wifi syncing of documents outside of iTunes. It, like any app, won't have all the bells and whistles and formatting goodies of a full fledged program, but it does have basic formatting (bold, underline, italics, indents)
    I don't think it comes with many fonts, but the iPad itself doesn't have a lot of fonts either.

  • Hey guyz my ipod touch 4g is not green battery symbol while charging or syncing on home screen nor it get charge?? plz give me some suggestion

    hey guyz my ipod touch 4g is not green battery symbol while charging or syncing on home screen nor it get charge?? plz give me some suggestion

    no buddy,  when my i pod touch 4 is off  i press its power button then it display a black screen in which there is an empty battery with red marking in side   an,,
    when i connect it with usb cable which i got with i pod touch....then itlike this in picture.. but after some time it get start to home screen with 20 % battery ..and no charging take place and no syncing take ....nor i tunes find it

Maybe you are looking for

  • What's a good mouse to buy?

    Is there a mouse that anyone recommends that works great with Final Cut Pro?

  • How to activate the business function HCM and HCM_LSO_CI_2

    Hi! To use the role of course administrator 1.4, we have to activate the business function HCM, Learning Solution 02 (HCM_LSO_CI_2). On IMG, I do not see about HCM_LSO_CI_2. Could you tell me the right way to do that? Please help. Thanks!

  • Format of Profile in Registry entries

    When i save the profile in windows7 it is creating an entry in Registry in the following path:   HKLM\SOFTWARE\Microsoft\Wlansvc\Interfaces\{Interface-GUID}\Profiles\{GUID} How to get that profile  GUID from Profile name

  • JSPM with version 7.01.8.1 is found on the system but in the stack it is l

    When trying to upgrade BIJava from 7.01 EHP1 to 7.3  i am facing the below error: ========= The stack does not match the system. Probably the system was changed after the stack was generated. Synchronize the system with SAP Solution Manager and then

  • ERMS : Email work items not getting created

    Hi Forum In my test system (CRM 2007), inbound mails were properly coming in and getting distributed to agent's inbox. But after the server restart, I realised that the work items for inbound mails stopped getting created due to which mails are not r