Table Control Sort doesnt  work , plz check my code

Hello
  Flag is defined thr in TCL1 attribute list(checked) w/selColumn & value is FLAG ,also defined as char in prog
  But syntax error is "No component exist with the name FLAg "
   Plz correct me .
   REPORT ZSD_REP_ORDER_BANK_CHANGE NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: VBAK,VBAP,VBRK,ZSD_TABL_ORDBANK,MARA,KONV.
CONTROLS: TCL1 TYPE TABLEVIEW USING SCREEN 0200.
DATA: ITAB LIKE ZSD_TABL_ORDBANK OCCURS 0 WITH HEADER LINE,
      WA_ITAB LIKE ZSD_TABL_ORDBANK,
      OK_CODE LIKE SY-UCOMM,
      SAVE_OK_CODE LIKE SY-UCOMM,
      ANSWER TYPE C,
      I LIKE SY-LOOPC ,
      J LIKE SY-LOOPC,
      V_LINES LIKE SY-LOOPC,
      LINE_COUNT LIKE SY-LOOPC,
      STS  TYPE N,
      FLAG,
      EMGRP LIKE MARA-EXTWG,
      QTY LIKE ZSD_TABL_ORDBANK-QTY,
      UPRICE LIKE ZSD_TABL_ORDBANK-UPRICE,
      TOT LIKE ZSD_TABL_ORDBANK-TOT,
      INO LIKE VBAP-POSNR.
FIELD-SYMBOLS:
     <FS_ITAB> LIKE LINE OF ITAB,
     <FS_TCL1> LIKE LINE OF TCL1-COLS.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
  SELECT-OPTIONS: S_CCODE FOR ZSD_TABL_ORDBANK-CCODE
                          NO INTERVALS NO-EXTENSION  OBLIGATORY,
                  S_SORG  FOR ZSD_TABL_ORDBANK-SORG
                          NO INTERVALS NO-EXTENSION  OBLIGATORY,
                  S_DCHAN FOR ZSD_TABL_ORDBANK-DISTCHAN,
                  S_DIV FOR ZSD_TABL_ORDBANK-DIV,
                  S_MATNO FOR ZSD_TABL_ORDBANK-MATNO,
                  S_CUSTNO FOR ZSD_TABL_ORDBANK-CUSTNO ,
                  S_QTNO FOR ZSD_TABL_ORDBANK-QTNO,
                  S_QTDAT FOR ZSD_TABL_ORDBANK-QTDAT,
                  S_QTVDAT FOR ZSD_TABL_ORDBANK-QTVALDAT,
                  S_SONO   FOR ZSD_TABL_ORDBANK-SONO.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
   SELECT * FROM  ZSD_TABL_ORDBANK
               INTO  TABLE ITAB
               WHERE CCODE IN S_CCODE
                 AND SORG IN  S_SORG
                 AND DISTCHAN IN  S_DCHAN
                 AND DIV IN S_DIV
                 AND MATNO IN  S_MATNO
                 AND CUSTNO IN  S_CUSTNO
                 AND QTNO IN  S_QTNO
                 AND QTDAT IN  S_QTDAT
                 AND QTVALDAT IN  S_QTVDAT
                 AND SONO IN  S_SONO .
      IF SY-SUBRC EQ 0.
         REFRESH ITAB.
         CALL SCREEN 0200.
      ELSE.
         MESSAGE E012(ZQOTBANK) .
      ENDIF.
*&      Module  SET_STATUS  OUTPUT
      text
MODULE SET_STATUS OUTPUT.
  SET PF-STATUS '0200'.
  SET TITLEBAR '0200'.
      SELECT * FROM  ZSD_TABL_ORDBANK
               INTO  TABLE ITAB
               WHERE CCODE IN S_CCODE
                 AND SORG IN  S_SORG
                 AND DISTCHAN IN  S_DCHAN
                 AND DIV IN S_DIV
                 AND MATNO IN  S_MATNO
                 AND CUSTNO IN  S_CUSTNO
                 AND QTNO IN  S_QTNO
                 AND QTDAT IN  S_QTDAT
                 AND QTVALDAT IN  S_QTVDAT
                 AND SONO IN  S_SONO .
      IF SY-SUBRC EQ 0.
        DESCRIBE TABLE ITAB LINES V_LINES.
        TCL1-LINES = V_LINES.
      ENDIF.
      LOOP AT ITAB.
         QTY = ITAB-QTY.
         UPRICE  = ITAB-UPRICE.
         TOT = QTY * UPRICE .
         ITAB-TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-CGL_QTY.
         UPRICE  = ITAB-CGL_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-CGL_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-BHEL_QTY.
         UPRICE  = ITAB-BHEL_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-BHEL_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-ALSTOM_QTY.
         UPRICE  = ITAB-ALSTOM_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-ALSTOM_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-SIEMENS_QTY.
         UPRICE  = ITAB-SIEMENS_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-SIEMENS_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-TELK_QTY.
         UPRICE  = ITAB-TELK_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-TELK_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         QTY = ITAB-OTH_QTY.
         UPRICE  = ITAB-OTH_UPRICE.
         TOT = QTY * UPRICE .
         ITAB-OTH_TOT = TOT .
         CLEAR: QTY, UPRICE, TOT.
         MODIFY ITAB.
      ENDLOOP.
ENDMODULE.                 " SET_STATUS  OUTPUT
*&      Module  SET_LINE_COUNT  INPUT
      text
MODULE SET_LINE_COUNT OUTPUT.
  LINE_COUNT = SY-LOOPC.
ENDMODULE.                 " SET_LINE_COUNT  INPUT
*&      Module SCROLL INPUT
      text
MODULE SCROLL_SORT INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
  WHEN 'P--'.
      TCL1-TOP_LINE = 1.
  WHEN 'P-'.
      TCL1-TOP_LINE = TCL1-TOP_LINE - LINE_COUNT.
      IF TCL1-TOP_LINE LE 0.
         TCL1-TOP_LINE = 1.
      ENDIF.
  WHEN 'P+'.
      I = TCL1-TOP_LINE + LINE_COUNT.
      J = TCL1-LINES - LINE_COUNT + 1.
      IF J LE 0.
         J = 1.
      ENDIF.
      IF I LE J.
         TCL1-TOP_LINE = I.
      ELSE.
         TCL1-TOP_LINE = J.
      ENDIF.
  WHEN 'P++'.
      TCL1-TOP_LINE = TCL1-LINES - LINE_COUNT + 1.
      IF TCL1-TOP_LINE LE 0.
          TCL1-TOP_LINE = 1.
      ENDIF.
  WHEN 'SORTUP'.
      READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY FLAG = 'X'.
      IF SY-SUBRC = 0.
          SORT ITAB ASCENDING BY (<FS_TCL1>-screen-name+5).
      ENDIF.
  WHEN 'SORTDN'.
      READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY FLAG = 'X'.
      IF SY-SUBRC = 0.
          SORT ITAB DESCENDING BY (<FS_TCL1>-screen-name+5).
      ENDIF.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND  INPUT
*&      Module  UPDATE_MOD  INPUT
      text
MODULE UPDATE_MOD INPUT.
CASE OK_CODE.
WHEN 'SAVE'.
      UPDATE ZSD_TABL_ORDBANK FROM ITAB .
      STS = SY-SUBRC .
      IF STS NE 0.
           MESSAGE E003(ZQOTBANK) .
      ENDIF.
  ENDCASE.
ENDMODULE.                 " UPDATE_MOD  INPUT
*&      Module  EXIT_COMAND  INPUT
      text
MODULE EXIT_COMAND INPUT.
CASE OK_CODE.
    WHEN 'BACK'.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          TITLEBAR       = 'Order Bank Entry'
          TEXT_QUESTION  = 'Do you want to Go BacK ?'
          TEXT_BUTTON_1  = 'Yes'
          TEXT_BUTTON_2  = 'No'
          DEFAULT_BUTTON = '2'
        IMPORTING
          ANSWER         = ANSWER.
      IF ANSWER = '1'.
        LEAVE TO SCREEN 0.
      ELSE.
      ENDIF.
    WHEN '%EX'.
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          TITLEBAR       = 'Order Bank Entry'
          TEXT_QUESTION  = 'Do you want to Exit ?'
          TEXT_BUTTON_1  = 'Yes'
          TEXT_BUTTON_2  = 'No'
          DEFAULT_BUTTON = '2'
        IMPORTING
          ANSWER         = ANSWER.
      IF ANSWER = '1'.
        LEAVE TO SCREEN 0.
      ELSE.
      ENDIF.
  ENDCASE.
ENDMODULE.                 " EXIT_COMAND  INPUT
Tnx advance

Hi Moni,
The Problem is with the READ statement.
READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY FLAG = 'X'.
The structure of TCL1 is different from what you think. TCL1 will be a deep structure with an internal table COLS. Now this internal table COLS will have the  standard structure:
SCREEN
INDEX
SELECTED
VISLENGTH
INVISIBLE
The Read statement tries to find a field of name FLAG in the TCL1-COLS structure. Therefore you get the error.
Try to read the COLS table with a correct key.
Regards,
Anand Mandalika.

Similar Messages

  • How do u reboot the computer when the control pad doesnt work

    how do u reboot the macbook pro when the control pad doesnt work??? and does anyone know how to get the control pad to work i cant move the cursor??

    By "control pad" do you mean "trackpad?" If the trackpad has stopped working then press the Power button and hold it down for 5-10 seconds. This will shutdown the computer. Insert the installer disc then restart the computer. After the chime press and hold down the "C" key until the computer starts up and you see the spinning gear. Then:
    Repair the Hard Drive and Permissions
    After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • Hi today i bought an itun gft card from shop  ,but i found it doesnt work and display "the code has not been proprly activted". why and how to fix it up

    hi today i bought an itun gft card from shop  ,but i found it doesnt work and display "the code has not been proprly activted". why and how to fix it up

    The people at the store the gift card came from didn't activate it. Ask them or the iTunes Store staff for assistance.
    (122684)

  • Table Control - Converting a Column to Check Box

    Hi,
    I need to have Check Boxs for 3 Columns in the Table Control of a Module Pool Programming Screen. Can you please suggest me how to do it?
    Appreciate Your Help.
    Thanks,
    Kannna

    In the Attributes of the Table Control u could enable the
    w/ selcolumn check box to get the first checkbox.
    For getting the 2nd and 3rd column as checkbox
    Declare 2 fields in the itab u r using for the TC
    Check like DD03D-KEYFLAG
    Add these fields in the TC ,
    Hope this will solve ur problem.,

  • FATALITY GAMING USB HS-1000 volume control button doesnt work

    I have just bought CREATIVE FATALITY GAMING USB HS-1000 headset. Everything is ok, except of volume control button on wire, it just doesnt work. I have installed and updated drivers, nothing helped. I have readed few topic on similar issues, but there wasnt any solution. My OS is winXP SP3.

    Have you tested your headset jock or where you plug your headset? It may be coming from that, as you have said you have tested the unit in another pc.

  • Plz check the code

    Hi all,
    Friends please tell me what is the problem with this code.....
    It is not giving what i want.......
    I want only that row in the table to have orange background which contains the value 'check'..
    but what it does is that it sets all the other rows as orange too....
    but when i select all the rows in the table.....it does show the color of the cell which contains 'check' and the color of the rest of the cells which are set to highlight color...
    please chk the following code and let me know if there is any error...
    public class ErrorEntryCellRenderer extends DefaultTableCellRenderer {
        /** Creates a new instance of ErrorEntryCellRenderer */
        public ErrorEntryCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
            return retValue;
    }Thank you..
    Message was edited by:
    vaibhavpingle

    it doesnt work then...it does not paint any thing......
    i did the following changes
    public Component getTableCellRendererComponent(JTable table, Color c, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
                } else {
                    setBackground(c);
                    validate();
            return retValue;
        }

  • I just downloaded ios7 and the control panel doesnt work no matter how many times i swipe from the  bottom. help please!

    so i downloaded ios7, waited, and everything seems fine and dandy. except for the fact that i cant access the control panel. i tried swiping for hours, i googled solutions, tried figuring it out myself, but nothing is working. my orientation screen is locked. if that matters? so can someone please tell me what i should do? thank you!

    Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    If no joy...
    Connect to iTunes on the computer you usually Sync with and “ Restore “...
    http://support.apple.com/kb/HT1414

  • Insert into temp table with sorting not works

    Hi,
    Am inserting some of the values into temp table . Before going to insert i will be sorting a cloumn in descending order and then i will try insert. But actually inserts in ascending order.Dont know why.
    Please find the code
    Create table #TempTable( column1 smalldateTime )
    Insert into #TempTable
    Select distinct(column1) from table1 where cloumn2 = 1 order by  column1 desc
    When i query the table
    select * from  #TempTable
    shows the dates are in ascending order instead it should in descending
    But when i query this Select distinct(column1) from table1 where cloumn2 = 1 order by  column1 desc
    dates are in descending order which means recent dates fills top

    Or use a CTE = Common Table Expression:
    CREATE TABLE #test (id int);
    INSERT INTO #test
    SELECT object_id
    FROM sys.objects;
    SELECT COUNT(*)
    FROM #test;
    GO
    ;WITH cte AS
    (SELECT Top 2 *
    FROM #test
    ORDER BY id desc)
    DELETE FROM cte;
    GO
    SELECT COUNT(*)
    FROM #test;
    GO
    DROP TABLE #test;
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Control+Z doesnt work while skype desktop is runni...

    Hi Friends,
    A while ago I saw that Control+z (undo) does not work. 
    I googled it and found on a forum that a previous version of skype had caused this issue.
    And I dediced to try it and it worked for me.
    So As of today Control+Z function of Windows 8 does not work on my desktop while Skype's latest version is running.
    Any work around, or any plans to fix it?
    Thanks,
    Ulaş

    Great. Thanks a lot

  • HT1420 i need to authorize my computer.  alt s and control b doesnt work.  there is no drop down menu

    I can't authorize my computer.  I did alt s and control b.  there is no drop down menu.  I have a windows computer.  I looked and tried everything Ive seen on community discussions.  apple's page didnt help

    Yay I found it!!!!  It is a little square box the is half black and half white with a arrow.   It is on the page that the music pictures moves to show the latest songs etc.   thank you diesel

  • My new ipod doesnt work plz help!

    I try to play songs and i hear the sound but the screen is blank so i cant tell what song is playnig.....the weird part is movies play great
    ipod video   Windows XP  

    Try resetting your iPod. It might work that way.

  • Tactic3d Alpha Control Panel doesnt work!

    hey guys
    I use the headset for some time(around 12 months) and have never had problems wit it.
    Since yesterday, the panel does not work anymore, I can open it normally without any error or freezing but than
    I can not accept any setting,EQ,FW , its always the same sound WTF... is this?
    I uninstalled and installed it several times without success -...
    ill hope u can help me,maybe some1 got old driver for me ?
    ps: im using win7 64bit
    sorry for my english

    hey guys
    I use the headset for some time(around 12 months) and have never had problems wit it.
    Since yesterday, the panel does not work anymore, I can open it normally without any error or freezing but than
    I can not accept any setting,EQ,FW , its always the same sound WTF... is this?
    I uninstalled and installed it several times without success -...
    ill hope u can help me,maybe some1 got old driver for me ?
    ps: im using win7 64bit
    sorry for my english

  • Plz check the code and tell me necessary  modifications

    report Z_PHANIBDC2
           no standard page heading line-size 255.
    include bdcrecx1.
    PARAMETERS:P_FILE   LIKE RLGRAP-FILENAME DEFAULT
    'C:Documents and Settingssarath.vempatiDesktopphani1.TXT' OBLIGATORY
    DATA: BEGIN OF RECORD1 OCCURS 0,
            LIFNR(018),
            BURKS(011),
            KTOKK(014),
            ANRED(014),
            NAME1(014),
            SURTL(014),
            STRAS(012),
            ORT01(040),
            LAND1(013),
            SPRAS(019),
            KUNNR(015),
            BANKL(012),
            BANKS(018),
            AKONT(022),
            ZTERM(012),
            MAHNA(016),
    END OF RECORD1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
       DEF_FILENAME           = 'P_FILE '
    *   DEF_PATH               = ' '
       MASK                   = ',*.*,*.*. '
       MODE                   = 'O'
       TITLE                  = 'GET FILENAME '
    IMPORTING
       FILENAME               = P_FILE
    *   RC                     =
    EXCEPTIONS
       INV_WINSYS             = 1
       NO_BATCH               = 2
       SELECTION_CANCEL       = 3
       SELECTION_ERROR        = 4
       OTHERS                 = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    START-OF-SELECTION.
    *LOOP AT RECORD1 FROM 2.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    *   CODEPAGE                      = ' '
       FILENAME                      = 'P_FILE '
       FILETYPE                      = 'DAT'
    *   HEADLEN                       = ' '
    *   LINE_EXIT                     = ' '
    *   TRUNCLEN                      = ' '
    *   USER_FORM                     = ' '
    *   USER_PROG                     = ' '
    *   DAT_D_FORMAT                  = ' '
    * IMPORTING
    *   FILELENGTH                    =
      TABLES
        DATA_TAB                      = RECORD1
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       FILE_OPEN_ERROR               = 2
       FILE_READ_ERROR               = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
      DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : LIFNR1 LIKE LFA1-LIFNR.
      LOOP AT RECORD1.
        IF RECORD1-LIFNR <> ''.
          LIFNR1 = RECORD1-LIFNR.
          RECORD3-LIFNR = RECORD1-LIFNR.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ELSE.
          RECORD3-LIFNR = LIFNR1.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ENDIF.
      ENDLOOP.
      DELETE RECORD1 WHERE LIFNR = ''.
      RECORD[] = RECORD1[].
      DATA VAR1(15).
      DATA VAR2(15).
      DATA COUNT(2).
      DATA COUNT1(2) VALUE 1.
      DATA VAR3(16).
      DATA VAR4(16).
      DATA VAR5(16).
      DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
    write:/ 'phani'.
    *IF SY-SUBRC <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    perform open_group.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  record1-lifnr.
    perform bdc_field       using 'RF02K-BUKRS'
                                  RECORD1-BURKS.
    perform bdc_field       using 'RF02K-KTOKK'
                                  RECORD1-KTOKK.
    perform bdc_field       using 'RF02K-REF_LIFNR'
                                  RECORD1-LIFNR.
    perform bdc_field       using 'RF02K-REF_BUKRS'
                                  RECORD1-BURKS.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  'RECORD1-ANRED'.
    perform bdc_field       using 'LFA1-NAME1'
                                  'RECORD1-NAME1'.
    perform bdc_field       using 'LFA1-SORTL'
                                  'RECORD1-SORTL'.
    perform bdc_field       using 'record1-STRAS'
                                  'RECORD1-STRAS'.
    perform bdc_field       using 'LFA1-ORT01'
                                  'RECORD1-ORT01'.
    perform bdc_field       using 'LFA1-LAND1'
                                  'RECORD1-LAND1'.
    perform bdc_field       using 'LFA1-SPRAS'
                                  'RECORD1-SPRAS'.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-KUNNR'
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKL(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'LFBK-BANKS(01)'
                                  'IN'.
    perform bdc_field       using 'LFBK-BANKL(01)'
                                  'RECORD1-BANKL'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-AKONT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'XK01'.
    perform close_group.

    report Z_PHANIBDC2
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA: BEGIN OF RECORD1 OCCURS 0,
            LIFNR(018),
            BURKS(011),
            KTOKK(014),
            ANRED(014),
            NAME1(014),
            SURTL(014),
            STRAS(012),
            ORT01(040),
            LAND1(013),
            SPRAS(019),
            KUNNR(015),
            BANKL(012),
            BANKS(018),
            AKONT(022),
            ZTERM(012),
            MAHNA(016),
    END OF RECORD1.
    <b>perform upload.</b>
    perform open_group.
    loop at recored.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  record1-lifnr.
    perform bdc_field       using 'RF02K-BUKRS'
                                  RECORD1-BURKS.
    perform bdc_field       using 'RF02K-KTOKK'
                                  RECORD1-KTOKK.
    perform bdc_field       using 'RF02K-REF_LIFNR'
                                  RECORD1-LIFNR.
    perform bdc_field       using 'RF02K-REF_BUKRS'
                                  RECORD1-BURKS.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELX1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  'RECORD1-ANRED'.
    perform bdc_field       using 'LFA1-NAME1'
                                  'RECORD1-NAME1'.
    perform bdc_field       using 'LFA1-SORTL'
                                  'RECORD1-SORTL'.
    perform bdc_field       using 'record1-STRAS'
                                  'RECORD1-STRAS'.
    perform bdc_field       using 'LFA1-ORT01'
                                  'RECORD1-ORT01'.
    perform bdc_field       using 'LFA1-LAND1'
                                  'RECORD1-LAND1'.
    perform bdc_field       using 'LFA1-SPRAS'
                                  'RECORD1-SPRAS'.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-KUNNR'
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKL(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'LFBK-BANKS(01)'
                                  'IN'.
    perform bdc_field       using 'LFBK-BANKL(01)'
                                  'RECORD1-BANKL'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-AKONT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-ZTERM'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'record1-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'XK01'.
    endloop.
    perform close_group.
    <b>form upload.</b>
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                       = ' '
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = RECORD1
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       FILE_OPEN_ERROR               = 2
       FILE_READ_ERROR               = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
      DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
      DATA : LIFNR1 LIKE LFA1-LIFNR.
      LOOP AT RECORD1.
        IF RECORD1-LIFNR <> ''.
          LIFNR1 = RECORD1-LIFNR.
          RECORD3-LIFNR = RECORD1-LIFNR.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ELSE.
          RECORD3-LIFNR = LIFNR1.
          RECORD3-BURKS = record1-BURKS.
          APPEND RECORD3.
        ENDIF.
      ENDLOOP.
      DELETE RECORD1 WHERE LIFNR = ''.
      RECORD[] = RECORD1[].
      DATA VAR1(15).
      DATA VAR2(15).
      DATA COUNT(2).
      DATA COUNT1(2) VALUE 1.
      DATA VAR3(16).
      DATA VAR4(16).
      DATA VAR5(16).
      DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
    write:/ 'phani'.
    *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.

  • HT1414 i need your hellp my restrictions doesnt work i need a code to put in i never had a code before

    hi my fried i need help on my iphone there is a code that needs to in the restriction i never put a code im having problem with my phone is it posible for u guys to give me a code or help me find one thank you

    There is no way to bypass nor any backdoor code to get around restrictions.
    If you have forgotten the restrictions passcode, the only way to change the restricted settings or turn it off is to restore the device as new.

  • Table control resolution

    Hi all,
    how to clear the problem of table control resolution.
    bye.

    Hi Pavan,
    Check this code :-
    data: lws_cnt type char2,
    lws_field type char15.
    LOOP AT i_invoicing_plan INTO wa_invoicing_plan.
    lws_cnt = sy-tabix.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lws_cnt
    IMPORTING
    output = lws_cnt .
    CONCATENATE 'FPLT-AFDAT(' lws_cnt ')' INTO lws_field.
    CONCATENATE wa_invoicing_plan-date+6(2)
    wa_invoicing_plan-date+4(2)
    wa_invoicing_plan-date+0(4) INTO lws_date
    SEPARATED BY '.'.
    PERFORM bdc_field USING lws_field lws_date.
    CONCATENATE 'FPLT-FPROZ(' lws_cnt ')' INTO lws_field.
    lws_perct = wa_invoicing_plan-percentage.
    CONDENSE lws_perct.
    PERFORM bdc_field USING lws_field lws_perct.
    ENDLOOP.
    While calling the transaction give like this:
    DATA: opt TYPE ctu_params.
    opt-dismode = 'N'.
    opt-updmode = 'A'.
    opt-defsize = 'X'.
    CALL TRANSACTION tcode
    USING i_bdcdata OPTIONS FROM opt MESSAGES INTO i_messages.
    LOOP AT i_messages.
    ENDLOOP.
    <b>Reward points if helpful</b>
    Thanks,
    Sachin

Maybe you are looking for

  • Report URL call in a procedure

    Hi all, I have the following report URL: http://localhost:7778/reports/rwservlet?report=f:\oracle\scott13.rdf&desformat=pdf&destype=cache&userid=wh1/scot@db I want to call this URL in a procedure how can i do this? Any reply would be appriciated. Reg

  • How to find max audio peak of combined audio tracks with effects applied?

    Hello all, I am working in PPro CS5.5. Often when I am working on a timeline I have two audio tracks of the same songs, one from the camera and one from a separate sound recorder, synced on the timeline so they combine into one signal. Applied to the

  • Camera no longer appears on desktop

    I've been connecting my Canon IXUS 870 to my Intel iMac to download photos to iPhoto. It all worked fine until yesterday - I'd simply plug the camera in, it would appear on the desktop and I would launch iPhoto where it would appear and off I'd go. Y

  • Restrict SQL Server access on IP and/or Hostname base

    I need to implement a security policy for machine-2-machine accounts that requires to limit their access to database, only if it is from the IP (or hostname) of the application server that hosts the application. It has been decided because is a nativ

  • IOS4 upgrade

    Can someone tell me how long it generally takes for apple to recognise the problem on the iOS4 software with car audios? and issue upgrade to solve it, or is it just a waiting game?