How to append the records through routine.

Hi Friends,
       I am using view wirh MARA and MARC extracting the data in to DSO.
    Then iam loading the data in to char of 0MAT_ST_LOC using  the data source of 0MAT_ST_LOC_ATTR. This data is comming from mard.
    hear my problem is when i am loading the data in to DSO(Material Plant data) that time i need to compare master data of 0MAT_ST_LOC . Then DSO of material and plant is equal to 0MAT_ST_LOC of Material and plant i need to populate the storage locations in to DSO object. The problem is one material and one plant having multiple storage locations.i need to insert the same record depending upon storage locations wise in DSO.
  I put it 0STOR_LOC in DSO structure how i need to write the code to populate this field data from 0MAT_ST_LOC. Please give me help on this i don't know ABAP.
Thanks,
Guna.
Edited by: gunasekhar raya on Sep 29, 2008 10:22 AM
Edited by: gunasekhar raya on Sep 29, 2008 6:12 PM

I dont have any readymade codes to provide you with.
But I can help you with the logic.
Get all your data from master (3 fields) into an internal table.  Also keep a fourth field (say, flag) in your internal table.  Update your internal table with all records from master data in your start routine.
In your update routine for Storage location, since you have multiple storage locations for a material plant combination, each time you read this internal table, set the flag (to some value), and each time for the same material plant update only those storage locations that donot have the flags set.
This is an alternative you could have besides using the infoset mechanism.
But, I wonder how much data your dso would hold considering its a material and plant combination...if the no. of records is huge, infoset would be more appropriate. ABAP has its limitations over performance.
Please consider this suggestion.
Regards,
Aby

Similar Messages

  • How to see the records through infoset

    I have created infoset with infocube and master table,how to see the records in infoset?
    Thanks
    Gnanasundaram C

    Hi Gnanasundaram
    Just execute the t-code RSISET and click on infoset display data  button it will take you to the records.
    Hope its clear a little..!
    Thanks
    K M R
    >
    Gnanasundaram.c wrote:
    > I have created infoset with infocube and master table,how to see the records in infoset?
    >
    > Thanks
    > Gnanasundaram C

  • How to delete the records with routine Z_AFRP4_DELETE as note [418584|

    Hello Gurus,
    I don't want to transfer data into HR and want to delete the records in table AFRP4 to business complete the Maintenance Orders
    Component version- EHP7 for SAP ERP 6.0
    Component-EA-APPL
    Release-617
    how can I delete these records
    Thanks fro Help
    AM

    Hello All,
    I found the solution, I copied the code in correction instruction number 0000282352 and create the report as programme  Z_AFRP4_DELETEand the executed
    *$*$----------------------------------------------------------------$*$*
    *$ Correction Inst.         0120061532 0000282352                     $*
    *$--------------------------------------------------------------------$*
    *$ Valid for       :                                                  $*
    *$ Software Component   SAP_APPL   SAP Application                    $*
    *$  Release 40B          All Support Package Levels                   $*
    *$  Release 45B          All Support Package Levels                   $*
    *$  Release 46B          All Support Package Levels                   $*
    *$  Release 46C          All Support Package Levels                   $*
    *$  Release 470          All Support Package Levels                   $*
    *$  Release 500          All Support Package Levels                   $*
    *$  Release 600          All Support Package Levels                   $*
    *$  Release 602          All Support Package Levels                   $*
    *$  Release 603          All Support Package Levels                   $*
    *$  Release 604          All Support Package Levels                   $*
    *$  Release 605          All Support Package Levels                   $*
    *$  Release 606          All Support Package Levels                   $*
    *$--------------------------------------------------------------------$*
    *$ Changes/Objects Not Contained in Standard SAP System               $*
    *$*$----------------------------------------------------------------$*$*
    *& Object          REPS Z_AFRP4_DELETE
    *& Object Header   PROG Z_AFRP4_DELETE
    *& REPORT Z_AFRP4_DELETE
    REPORT  Z_AFRP4_DELETE .
    * This report deletes confirmation records from table AFRP4 that are
    * not longer needed. Run it without update flag first !!
       tables: afrp4.
       data: lt_afrp4 like afrp4 occurs 0,
             ls_afrp4 like afrp4.
       selection-screen begin of block order with frame.
       select-options: zorders for afrp4-aufnr.   "order number
       selection-screen end   of block order.
       parameters: update as checkbox.
       select * from afrp4 into table lt_afrp4
                    where aufnr in zorders.
       if lt_afrp4[] is initial.
         format color col_normal.
         write: 'No HR confirmation background records read.'.
         exit.
       endif.
       format color col_heading.
       write: /5 'Order', 25 'Confirmation', 45 'Counter'.
       skip.  uline.  skip.
    * show corrections
       loop at lt_afrp4 into ls_afrp4.
         format color col_normal.
         write: /5 ls_afrp4-aufnr, 25 ls_afrp4-rueck, 45 ls_afrp4-rmzhl.
       endloop.
    * update on data base table
       if not update is initial.
         skip.  uline.  skip.
         delete afrp4 from table lt_afrp4.
         if sy-subrc is initial.
           format color col_positive.
           write: 'HR-records deleted successfull'.
         else.
           format color col_negative.
           write: 'Error when trying to update data base table AFRP4.'.
         endif.
       endif.

  • How to rectify the errors through call transaction metod in bdc

    how to rectify the errors through call transaction metod in bdc

    Hi ,
    View the highlited part of the below code.
    REPORT ygfrivat1 NO STANDARD PAGE HEADING
                     LINE-SIZE 165
                     MESSAGE-ID yif_groc.
    Program     YGFRIVAT1
    Function    Report to Upload the VAT Adjustment File.
    Author      ARENAPU
    Date        11.05.2007
    PMTS        AM12810157
    Transport   G6DK937834
    Description:
    Modification log:
    1. Changed by  :
       Changed on  :
       PMTS        :
       Transport   :
       Tag         :
       Description :
           T A B L E S   D E C L A R A T I O N S
    TABLES: edidc,  "Control record (IDoc)
            edids,  "Status Record (IDoc)
            t001w.
    Internal Tables Declaration.
    Internal table to hold data from table EDIDS
    DATA: BEGIN OF t_edids OCCURS 0,
           docnum LIKE edids-docnum,
           logdat LIKE edids-logdat,
           logtim LIKE edids-logtim,
           countr LIKE edids-countr,
           credat LIKE edids-credat,
           uname  LIKE edids-uname,
          END OF t_edids,
    Internal table to hold data from table EDIDC
          BEGIN OF t_edidc OCCURS 0,
           docnum LIKE edidc-docnum,
           rcvprt LIKE edidc-rcvprt,
           rcvprn LIKE edidc-rcvprn,
           credat LIKE edidc-credat,
          END OF t_edidc,
    Internal table to hold data from upload file
          BEGIN OF t_tab OCCURS 0,
           cust(10),        "site/customer number
           date(10),        "transaction date
           currency(04),    "currency
           extnbr(15),      "external reference number
           pos-cont(05),    "POS controler
           pos-id(25),      "POS id
           cashier(10),     "cashier name
           qualif(04),      "qualifier of the article
           matnr(25),       "article number
           qty(10),         "quantity
           sale(16),        "sale value
           pos-tr(04),      "POS transfert type
           paymeth(04),     "payment method
           final(35),       "final price
           tarcur(04),      "target currency
           assign(35),      "assignment day
           error,
          END OF t_tab,
    Internal table for Report display.
          BEGIN OF t_tab1 OCCURS 0,
           cust(10),                    "site/customer number
           date(10),                    "transaction date
           currency(04),                "currency
           extnbr(15),                  "external reference number
           pos-cont(05),                "POS controler
           pos-id(25),                  "POS id
           cashier(10),                 "cashier name
           qualif(04),                  "qualifier of the article
           matnr(25),                   "article number
           qty(16)   TYPE p DECIMALS 2, "quantity
           sale(16)  TYPE p DECIMALS 2, "sale value
           pos-tr(04),                  "POS transfert type
           paymeth(04),                 "payment method
           final(16) TYPE p DECIMALS 2, "final price
           tarcur(04),                  "target currency
           assign(35),                  "assignment day
          END OF t_tab1,
          t_tab_temp LIKE t_tab OCCURS 0 WITH HEADER LINE,
    Internal table to Validate Customer no.
          BEGIN OF t_check OCCURS 0,
           werks LIKE t001w-werks,
           vkorg LIKE t001w-vkorg,
           value(40),
          END OF t_check,
          t_check_temp LIKE t_check OCCURS 0 WITH HEADER LINE.
    Internal table to hold data from table ZCS_PARAM.
    DATA: BEGIN OF t_zcs_param OCCURS 0.
            INCLUDE STRUCTURE zcs_param.
    DATA: vkorg LIKE t001w-vkorg,
          END OF t_zcs_param.
    *Internal table to hold Messages.
    DATA: BEGIN OF t_message OCCURS 0,
             msgnum TYPE msgnum,
             msgtyp TYPE msgtyp,
             msgtxt TYPE msgtext,
           END OF t_message.
    *Work area for table t_message
    DATA : w_message LIKE LINE OF t_message.
    Internal table to hold BDC data
    DATA: t_bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE,
    Internal table to collect error messages
          messtab   LIKE bdcmsgcoll OCCURS 0  WITH HEADER LINE.
    *Internal table to hold messages from call transaction
    DATA: BEGIN OF t_text OCCURS 0,
           desc(150),
           msgtxt(100),
          END OF t_text.
           D A T A   D E C L A R A T I O N S
    DATA: n TYPE i,
          gv_status(11) TYPE c, "Shows status, Production or Test
          gv_exit TYPE c,  "Exit Flag
          gv_qty(16)   TYPE p DECIMALS 2, "Variable to sum Quantity
          gv_sale(16)  TYPE p DECIMALS 2, "Variable to sum Amount
          gv_final(16) TYPE p DECIMALS 2. "Variable to sum Final Amount
    DATA: w_text(100),
          gv_mode TYPE c,
          error TYPE c.  "Flag to Indicate error.
    CONSTANSTS DECLARATION
    CONSTANTS : gc_fieldname LIKE dynpread-fieldname VALUE 'P_FNAME',
                gc_seq_no LIKE zcs_param-seq_no VALUE '00110',
                gc_object LIKE zcs_param-object VALUE 'YGFVAT',
                gc_paraname LIKE zcs_param-paraname VALUE 'VKORG',
                gc_back TYPE c VALUE 'N',
                gc_error TYPE c VALUE 'E',
                gc_all TYPE c VALUE 'A'.
               S E L E C T I O N   S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS : p_fname LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-002 FOR FIELD p_test.
    PARAMETERS : p_test AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK a1.
    SELECTION-SCREEN BEGIN OF BLOCK a2 WITH FRAME TITLE text-006.
    PARAMETERS : rb_back RADIOBUTTON GROUP rb1 DEFAULT 'X',
                 rb_error RADIOBUTTON GROUP rb1,
                 rb_all RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF BLOCK a2.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *Subroutine to provide F4 help for file name
      PERFORM fr_get_filename.
           I N I T I A L I Z A T I  O N
    INITIALIZATION.
    *Subroutine to check authorization.
    PERFORM fr_authority_check.
            T O P - O F - P A G E
    TOP-OF-PAGE.
    *Subroutine to diplay header
      PERFORM fr_display_header.
             S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
    *Subroutine to upload data from presentation server.
      PERFORM fr_upload_data.
    *Subroutine to validate records from uploaded file.
      PERFORM fr_validate_data.
    *Subroutine to build report internal table.
      PERFORM fr_build_rep.
             E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *Subroutine to display report.
      PERFORM fr_write_report.
            F O R M   S U B R O U T I N E S
    *&      Form  fr_get_filename
          text
    FORM fr_get_filename.
      DATA : lv_repid LIKE sy-repid,         " Report id
             lv_file  LIKE ibipparms-path.   " File Path
      lv_repid = sy-repid.
    F4 help for file path.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = lv_repid
                dynpro_number = syst-dynnr
                field_name    = gc_fieldname                    " p_fname1
           IMPORTING
                file_name     = lv_file.
      IF NOT lv_file EQ space.
        p_fname = lv_file.
      ELSE.
        MESSAGE e999 WITH 'Invalid Path'(005).
      ENDIF.
    ENDFORM.                    " fr_get_filename
    *&      Form  fr_upload_data
          text
    FORM fr_upload_data.
      DATA: lv_fname TYPE string.
      CLEAR lv_fname.
      lv_fname = p_fname.
    Uploading file from PC or presentation server to internal table.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                filename            = lv_fname
                filetype            = 'ASC'
                has_field_separator = 'X'
           TABLES
                data_tab            = t_tab
           EXCEPTIONS
                file_open_error     = 1.
      IF sy-subrc <> 0.
        DESCRIBE TABLE t_message LINES n.
        w_message-msgnum = n + 1.
        w_message-msgtyp = 'E'.
        MOVE text-m01  TO w_message-msgtxt.
        APPEND w_message TO t_message.
    Subroutine for writing log.
        PERFORM fr_write_log.
      ENDIF.
    ENDFORM.                    " fr_upload_data
    *&      Form  fr_validate_data
          text
    FORM fr_validate_data.
      DATA : lv_lines1 TYPE i,
             lv_lines2 TYPE i.
    *Obtain Status depending on Check box selected.
      IF p_test IS INITIAL.
        gv_status = 'PRODUCTION'.
      ELSE.
        gv_status = 'TEST RUN'.
      ENDIF.
    *Batch Mode
      CLEAR gv_mode.
      IF rb_back EQ 'X'.          "No Display
        MOVE gc_back TO gv_mode.
      ELSEIF rb_error EQ 'X'.     "Error Only
        MOVE gc_error TO gv_mode.
      ELSEIF rb_all EQ 'X'.       "All Screens
        MOVE gc_all TO gv_mode.
      ENDIF.
      IF NOT t_tab[] IS INITIAL.
        SORT t_tab BY cust.
        REFRESH t_tab_temp.
        t_tab_temp[] = t_tab[].
        SORT t_tab_temp BY cust.
        DELETE ADJACENT DUPLICATES FROM t_tab_temp COMPARING cust.
        IF NOT t_tab_temp[] IS INITIAL.
          SELECT werks vkorg FROM t001w
                             INTO TABLE t_check
                             FOR ALL ENTRIES IN t_tab_temp
                             WHERE werks = t_tab_temp-cust+0(4).
          IF sy-subrc = 0.
            SORT t_check BY werks.
          ENDIF.
          LOOP AT t_check.
            IF t_check-vkorg <> ' '.
              MOVE t_check-vkorg TO t_check-value.
              MODIFY t_check TRANSPORTING value.
            ENDIF.
          ENDLOOP.
        ENDIF.
        FREE t_tab_temp.
      ENDIF.
      IF NOT t_check[] IS INITIAL.
        REFRESH t_check_temp.
        t_check_temp[] = t_check[].
        SORT t_check_temp BY value.
        DELETE ADJACENT DUPLICATES FROM t_check_temp COMPARING value.
        IF NOT t_check_temp[] IS INITIAL.
          SELECT * FROM zcs_param INTO TABLE t_zcs_param
                   FOR ALL ENTRIES IN t_check_temp
                   WHERE seq_no   EQ gc_seq_no
                     AND object   EQ gc_object
                     AND paraname EQ gc_paraname
                     AND value    EQ t_check_temp-value.
          IF sy-subrc = 0.
            SORT t_zcs_param BY value.
          ENDIF.
        ENDIF.
        FREE t_check_temp.
      ENDIF.
      IF NOT t_tab[] IS INITIAL.
        LOOP AT t_tab.
          READ TABLE t_check WITH KEY werks = t_tab-cust BINARY SEARCH.
          IF sy-subrc <> 0.
            MOVE 'X' TO t_tab-error.
            MODIFY t_tab TRANSPORTING error.
            DESCRIBE TABLE t_message LINES n.
            w_message-msgnum = n + 1.
            w_message-msgtyp = 'E'.
            CONCATENATE t_tab-cust text-030
            INTO w_message-msgtxt SEPARATED BY space.
            APPEND w_message TO t_message.
    Subroutine for writing log.
            PERFORM fr_write_log.
            EXIT.
          ELSE.
            READ TABLE t_zcs_param WITH KEY value = t_check-vkorg
                                                         BINARY SEARCH.
            IF sy-subrc <> 0.
              MOVE 'X' TO t_tab-error.
              MODIFY t_tab TRANSPORTING error.
              DESCRIBE TABLE t_message LINES n.
              w_message-msgnum = n + 1.
              w_message-msgtyp = 'E'.
              CONCATENATE text-003 t_tab-cust text-004 t_check-vkorg
              INTO w_message-msgtxt SEPARATED BY space.
              APPEND w_message TO t_message.
    Subroutine for writing log.
              PERFORM fr_write_log.
              EXIT.
            ELSE.
              PERFORM fr_format_tab.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE t_tab LINES lv_lines1.
      IF lv_lines1 <> 0.
        DELETE t_tab WHERE error EQ 'X'.
      ENDIF.
      DESCRIBE TABLE t_tab LINES lv_lines2.
      IF lv_lines2 <> 0.
        IF lv_lines2 <> lv_lines1.
          EXIT.
        ELSE.
          IF p_test IS INITIAL.
            LOOP AT t_tab.
    *Subroutine to build BDC table
              PERFORM fr_fill_bdctab.
    *Subroutine to Post Data into SAP.
              PERFORM fr_data_posting.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_validate_data
    *&      Form  fr_write_log
          text
    FORM fr_write_log.
      CLEAR error.
      error = 'X'.
      WRITE:/1 'Msg No'(027), 10 'Type'(028), 20 'Text'(029).
      ULINE:/1(120).
      FORMAT RESET.
      LOOP AT t_message.
        IF t_message-msgtyp = 'E'.
          FORMAT COLOR 6 INTENSIFIED .
        ELSEIF t_message-msgtyp = 'W'.
          FORMAT COLOR 3 INTENSIFIED .
        ELSEIF t_message-msgtyp = 'I'.
          FORMAT COLOR 5 INTENSIFIED .
        ENDIF.
        WRITE:/1 t_message-msgnum,
              10 t_message-msgtyp,
              20 t_message-msgtxt.
        FORMAT RESET.
      ENDLOOP.
      ULINE:/1(120).
    ENDFORM.                    " fr_write_log
    *&      Form  fr_write_report
          text
    FORM fr_write_report.
      CLEAR gv_exit.
      LOOP AT t_message.
        IF t_message-msgtyp = 'E'.
          gv_exit = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF NOT gv_exit IS INITIAL.
        EXIT.
      ELSE.
        PERFORM fr_display_report.
        IF NOT t_text[] IS INITIAL.
    Subroutine for Display Call Transaction messages.
          PERFORM fr_write_msg.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_write_report
    *&      Form  fr_display_report
          text
    FORM fr_display_report.
      IF NOT t_tab1[] IS INITIAL.
        CLEAR: gv_qty, gv_sale, gv_final.
        LOOP AT t_tab1.
          WRITE:/1(10) t_tab1-cust,
                13(10) t_tab1-date,
                25(05) t_tab1-currency,
                32(14) t_tab1-extnbr,
                48(09) t_tab1-pos-cont,
                60(18) t_tab1-matnr,
                80(16) t_tab1-qty RIGHT-JUSTIFIED ,
                98(16) t_tab1-sale RIGHT-JUSTIFIED ,
               116(07) t_tab1-paymeth,
               125(16) t_tab1-final RIGHT-JUSTIFIED,
               143(06) t_tab1-tarcur,
               152(12) t_tab1-assign.
          gv_qty   = t_tab1-qty   + gv_qty.
          gv_sale  = t_tab1-sale  + gv_sale.
          gv_final = t_tab1-final + gv_final.
        ENDLOOP.
        FORMAT COLOR 3.
        ULINE: /(164).
        WRITE:/ 'TOTALS',
          80(16) gv_qty RIGHT-JUSTIFIED,
          98(16) gv_sale RIGHT-JUSTIFIED,
         125(16) gv_final RIGHT-JUSTIFIED,
         182 ''.
        ULINE: /(164).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    " fr_display_report
    *&      Form  FR_DISPLAY_HEADER
          text
    FORM fr_display_header.
      IF error IS INITIAL.
        FORMAT COLOR 1.
        WRITE:/ 'Date upload           :'(007),   25 sy-datum,  38 ''.
        WRITE:/ 'Production or Test Run:'(008),   25 gv_status, 38 ''.
        WRITE:/ 'Upload User Logon     :'(009),   25 sy-uname,  38 ''.
        ULINE: /(164).
        WRITE:/1(04) 'Site'(010),
              13(10) 'Date'(011),
              25(05) 'Curr.'(012),
              32(14) 'Receipt'(013),
              48(09) 'Cashier'(014),
              60(18) 'Article'(015),
              92     'Qty'(016),
              102    'Item Amount'(017),
              116(7) 'M.o.P.'(018),
              128    'Tender Amount'(019),
              143(6) 'T.Curr'(020),
             152(12) 'Assignment'(021).
        ULINE:/(164).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    " FR_DISPLAY_HEADER
    *&      Form  fr_newdynpro
          text
    FORM fr_newdynpro USING program LIKE bdcdata-program
                            dynpro  LIKE bdcdata-dynpro.
      t_bdcdata-program = program .
      t_bdcdata-dynpro  = dynpro.
      t_bdcdata-dynbegin = 'X'.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " fr_newdynpro
    *&      Form  fr_loadfield
          text
    FORM fr_loadfield USING field LIKE bdcdata-fnam
                            value.
      t_bdcdata-fnam = field.
      t_bdcdata-fval = value.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " fr_loadfield
    *&      Form  fr_fill_bdctab
          text
    FORM fr_fill_bdctab.
      REFRESH t_bdcdata.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
      PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
      PERFORM fr_loadfield USING 'G_DATUM'   t_tab-date.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BON'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '500'.
      PERFORM fr_loadfield USING 'WPSCB01-POSKREIS'   t_tab-pos-cont.
      PERFORM fr_loadfield USING 'WPSCB01-KASSID'     t_tab-pos-id.
      PERFORM fr_loadfield USING 'WPSCB01-BELEGWAERS' t_tab-currency.
      PERFORM fr_loadfield USING 'WPSCB01-CSHNAME'    t_tab-cashier.
      PERFORM fr_loadfield USING 'WPSCB01-BONNUMMER'  t_tab-extnbr.
      PERFORM fr_loadfield USING 'E1WPB02-QUALARTNR(01)'  t_tab-qualif.
      PERFORM fr_loadfield USING 'E1WPB02-ARTNR(01)'      t_tab-matnr.
      PERFORM fr_loadfield USING 'E1WPB02-MENGE(01)'      t_tab-qty.
      PERFORM fr_loadfield USING 'WPSCB03-KONDVALUE(01)'  t_tab-sale.
      PERFORM fr_loadfield USING 'E1WPB02-VORGANGART(01)' t_tab-pos-tr.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'ZAHL'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
      PERFORM fr_loadfield USING 'WPSCB06-ZAHLART'  t_tab-paymeth.
      PERFORM fr_loadfield USING 'WPSCB06-SUMME'    t_tab-final.
      PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
      PERFORM fr_loadfield USING 'WPSCB06-ZUONR'    t_tab-assign.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'SAVE'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '530'.
      PERFORM fr_loadfield USING 'WPSCB06-ZAHLART'  t_tab-paymeth.
      PERFORM fr_loadfield USING 'WPSCB06-SUMME'    t_tab-final.
      PERFORM fr_loadfield USING 'WPSCB06-WAEHRUNG' t_tab-tarcur.
      PERFORM fr_loadfield USING 'WPSCB06-ZUONR'    t_tab-assign.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
      PERFORM fr_newdynpro USING 'SAPLSPO1' '0200'.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'YES'.
      PERFORM fr_newdynpro USING 'SAPMWPUK' '100'.
      PERFORM fr_loadfield USING 'G_FILIALE' t_tab-cust.
      PERFORM fr_loadfield USING 'G_DATUM'   t_tab-date.
      PERFORM fr_loadfield USING 'BDC_OKCODE' 'BACK'.
    ENDFORM.                    " fr_fill_bdctab
    *&      Form  fr_data_posting
          text
    FORM fr_data_posting.
      IF NOT t_bdcdata[] IS INITIAL.
        REFRESH messtab.
        CALL TRANSACTION 'WPUK' USING t_bdcdata
                                MODE gv_mode
                                UPDATE 'S'
                                MESSAGES INTO messtab.
        IF sy-subrc = 0 .
          CLEAR w_text.
          LOOP AT messtab.
            CALL FUNCTION 'FORMAT_MESSAGE'
                 EXPORTING
                      id        = messtab-msgid
                      lang      = sy-langu
                      no        = messtab-msgnr
                      v1        = messtab-msgv1
                      v2        = messtab-msgv2
                      v3        = messtab-msgv3
                      v4        = messtab-msgv4
                 IMPORTING
                      msg       = w_text
                 EXCEPTIONS
                      not_found = 1
                      OTHERS    = 2.
            MOVE w_text TO t_text-msgtxt.
            CONCATENATE 'Site:'(031)    t_tab-cust
                        'Article:'(024) t_tab-matnr
                        'Posted Sucessfully'(032)
              INTO t_text-desc SEPARATED BY space.
            APPEND t_text.
            CLEAR t_text.
          ENDLOOP.
        ELSE.
          CLEAR w_text.
          LOOP AT messtab.
            CALL FUNCTION 'FORMAT_MESSAGE'
                 EXPORTING
                      id        = messtab-msgid
                      lang      = sy-langu
                      no        = messtab-msgnr
                      v1        = messtab-msgv1
                      v2        = messtab-msgv2
                      v3        = messtab-msgv3
                      v4        = messtab-msgv4
                 IMPORTING
                      msg       = w_text
                 EXCEPTIONS
                      not_found = 1
                      OTHERS    = 2.
            MOVE w_text TO t_text-msgtxt.
            IF messtab-msgnr EQ '213'.
              CONCATENATE 'Site:'(031)    t_tab-cust
                          'Article:'(024) t_tab-matnr
                          'Posted Sucessfully'(032)
               INTO t_text-desc SEPARATED BY space.
              APPEND t_text.
              CLEAR t_text.
              EXIT.        ELSE.
              CONCATENATE 'Site:'(031)    t_tab-cust
                          'Article:'(024) t_tab-matnr
                          'Not Posted'(033)
               INTO t_text-desc SEPARATED BY space.
              APPEND t_text.
              CLEAR t_text.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_data_posting
    *&      Form  fr_authority_check
          text
    FORM fr_authority_check.
      AUTHORITY-CHECK OBJECT 'Y_VATADJ'
               ID 'VKORG' FIELD t001w-vkorg
               ID 'TCD'   FIELD 'YGFVAT'.
      IF sy-subrc NE 0.
        MESSAGE e999 WITH text-m02.
      ENDIF.
    ENDFORM.                    " fr_authority_check
    *&      Form  fr_write_msg
          text
    FORM fr_write_msg.
      SKIP.
      ULINE:/(164).
      WRITE:/
      'Messages encountered while Calling Transaction WPUK'(025),
          90 'Message Text'(026).
      ULINE:/1(164).
      LOOP AT t_text.
        WRITE:/1 t_text-desc,
              90 t_text-msgtxt,
              164 ''.
      ENDLOOP.
      ULINE:/1(164).
    ENDFORM.                    " fr_write_msg
    *&      Form  FR_BUILD_REP
          text
    FORM fr_build_rep.
      IF error IS INITIAL.
        IF NOT t_tab[] IS INITIAL.
          LOOP AT t_tab.
            MOVE:
              t_tab-cust     TO t_tab1-cust,        "site/customer number
              t_tab-date     TO t_tab1-date,        "transaction date
              t_tab-currency TO t_tab1-currency,    "currency
            t_tab-extnbr   TO t_tab1-extnbr,      "external reference number
              t_tab-pos-cont TO t_tab1-pos-cont,    "POS controler
              t_tab-pos-id   TO t_tab1-pos-id,      "POS id
              t_tab-cashier  TO t_tab1-cashier,     "cashier name
             t_tab-qualif   TO t_tab1-qualif,      "qualifier of the article
              t_tab-matnr    TO t_tab1-matnr,       "article number
              t_tab-pos-tr   TO t_tab1-pos-tr,      "POS transfert type
              t_tab-paymeth  TO t_tab1-paymeth,     "payment method
              t_tab-tarcur   TO t_tab1-tarcur,      "target currency
              t_tab-assign   TO t_tab1-assign.
            REPLACE ',' WITH '.' INTO t_tab-qty.
            CONDENSE t_tab-qty NO-GAPS.
            MOVE t_tab-qty TO t_tab1-qty.
            REPLACE ',' WITH '.' INTO t_tab-sale.
            CONDENSE t_tab-sale NO-GAPS.
            MOVE t_tab-sale TO t_tab1-sale.
            REPLACE ',' WITH '.' INTO t_tab-final.
            CONDENSE t_tab-final NO-GAPS.
            MOVE t_tab-final TO t_tab1-final.
            APPEND t_tab1.
            CLEAR t_tab1.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " FR_BUILD_REP
    *&      Form  fr_format_tab
          text
    FORM fr_format_tab.
      DATA : lv_qty TYPE string.
      IF NOT t_tab-qty IS INITIAL.
        IF t_tab-qty+0(1) EQ '-'.
          CLEAR lv_qty.
          MOVE t_tab-qty TO lv_qty.
          CLEAR t_tab-qty.
          SHIFT lv_qty LEFT CIRCULAR.
          CONDENSE lv_qty NO-GAPS.
          MOVE lv_qty TO t_tab-qty.
          MODIFY t_tab TRANSPORTING qty.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fr_format_tab

  • HOw to view the records in a structure qaqee ?

    hi every one ,
    we can view the tble through SE16 
    HOw to view the records in a structure qaqee ?
    Thanks in advance

    Hello,
    Please check the link
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/90/8d7301b1af11d194f600a0c929b3c3/content.htm
    You can view the struture in SE11 t-code for its components.
    Regards,
    Shailesh

  • How to do the Record Level commit in DB Adapter

    Hi,
    I am using Oracle JDeveloper 11.1.1.6.0 and SOA server 11.1.1.6
    Problem Description_
    I am fetching multiple records using File Adapter in BPEL process, After Fetching I am writing those records in Database using Database Adpter.
    If any error records comes the database adpater rollback the complete transaction and none of the records is inserted into the Database.
    **Can anyone please tell me how to do the record level commit in Database Adapter so that All the success records can be inserted into the database except the Failure record*.*
    I dont want to call the Database adpater in loop multiple times to insert each record as it hampers the performance.
    Thanks in Advance
    Sunil

    I believe you are polling a file and inside the BPEL, inserting the records into the database using the database adapter.
    so according to your requirement you can do any one of the following things...
    1. Instead of using the database adapter for inserting the record, you can call a Stored Procedure which it takes the record fields as input and it inserts the record into the table and does a commit at the end. when you follow this approach, make sure your data source is defined as Non-XA, otherwise you will face some errors.
    2. If you are using the database adapter insert operation only, inside the BPEL, for the partnerlink of the database adapter, go to the properties and for the property "idempotent", give a value of false.
    by doing this, what happens means, after calling the database adapter from BPEL through the invoke activity, the transaction is committed and from the next activity i mean after the invoke, a new transaction will be started but it will use the same thread though
    3. If you are using the database adapter insert operation only, inside the BPEL, for the partnerlink of the database adapter, go to the properties and for the property "NonBlockingInvoke", give a value of true.
    by doing this, what happens means, the database adapter insert operation will happen in a separate transaction and it will be committed, inside the BPEL after the invoke activity, a new thread and transaction will be started
    4. Also, if you are using the database adapter insert operation, don't follow the steps as mentioned in either 2 or 3, you can simply put a dehydrate activity after the invoke activity.
    According to your requirement, all the four approaches works. But my personal feeling, don't go for 4, instead 1 is better, 2 or 3 is also good.
    Hope this helps,
    N

  • How to append the User Agent String in IE11

    We use "Internet Explorer maintenance" GPO to append the standard User Agent String for IE9 with "ADFSIntAuth". "Internet Explorer maintenance" is deprecated and will not work anymore for IE11 and later.
    Now we want to move to IE11 and I can't find a solution to append the User Agent String. With GPO this isn't possible anymore (Why Microsoft?). And the registry keys I've tested won't do the job. I've tested 
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform
    So whats is the best way to append the user agent string for IE11?
    http://social.technet.microsoft.com/Forums/en-US/cdc999aa-faec-4aa5-9025-f12a524794f0/ie10-user-agent-string?forum=winserverGP didn't help.

    Thank you for the Reply Roger.
    I have already read the website you are referring to, but it doesn't say how to append the User Agent String.
    Only this:
    "Earlier versions of the browser included
    Pre-Platform and Post-platform registry value tokens in the user-agent string. However, this led to
    performance issues for customers of certain tools and add-ons. As a result, these tokens are now reported only through the
    navigator.userAgent property"
    With a dead link to the article "navigator.userAgent", but with a search I came to this article: http://msdn.microsoft.com/en-us/library/ie/ms534712(v=vs.85).aspx But also this article won't say how to append the User Agent String for all
    clients in a corporate environment.

  • How to append the data list bod (JList)

    how to append the data list box (JList)
    Message was edited by:
    raju_2reddy

    For this you will need a nested internal table. such that each column of the internal table should be declared as another internal table.
    Try something like this :
    " Lets say that the type of table that will be returned by the function BOM is ty_ret_tab, then declare as follows
    types begin of ty_tab,
    c1 type table of ty_ret_tab,
    c2 type table of ty_ret_tab,
    end of ty_tab.
    data gt_tab type standard table of ty_tab,
            gwa_tab like ty_tab.
    Now the question is how many columns should you declare ? Because you said that in a loop you intend to call a function which will return a internal table and this internal table you need to store in a column of another internal table. And if this is not fixed, you would need to do some dynamic programming to achieve this.
    But if we assume that there are fixed number of columns and fixed number of loops, then within the loop, you wiill have to simply move the data from the returned table to each of the columns. Then append the work area outside the loop.
    data field(30) type c.
    data c_tabix(10) type c.
    field-symbols <fs> type ret_tab.  " this should be
    Loop at itab.
    call function BOM...
    exporting...
    importing.....
    tables  ret_itab.
    c_tabix = sy-tabix.
    concatenate 'C' c_tabix into field.
    condense field.
    assign component  (field) of structure gwa_tab to <fs>.
    <fs> = ret_tab.   " Pass data to each column
    endloop.
    append gwa_tab to gt_tab.  " Now a single record with all columns containing an internal table is built.
    Hope this pseudo code helps.
    BR,
    Advait

  • How to edit the records in error stock.

    Hi Experts,
                 i have error records in error stack and the remaining records are loaded successfuly . here my doubt is how to edit the records in error stack because its not giving the edit option .
    i want to get the edit option means i need to delete the request in target r wt ?
    and there are two more targets is there below this process .
    Advance Thanks.
    Regards
    SAP

    HI
    If you have less number records in this request(which you extracted now), delete that request from all the targets and reload again with option Valid records update, reporting not possible.
    this is the option which is recommended.
    follow the below 2 docs as well.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80dd67b9-caa0-2e10-bc95-c644cd119f46?QuickLink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/007f1167-3e64-2e10-a798-e1ea456ef21b?QuickLink=index&overridelayout=true
    Regards,
    Venkatesh
    Edited by: Venkateswarlu Nandimandalam on Jan 24, 2012 4:35 PM

  • Regarding how to delete the record in internal table

    Hi experts ,
    how to delete the record in intarnal table after validating the data,
    if record contains invalid fields?
    i am giving my code see this and give me the answer?
    loop at it_data into wa_data .
    Validate  Cost Center
        READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-004.
        ENDIF.
    Validate source file material ( material number )
    loop at it_mara into wa_mara .
      read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
               if sy-subrc NE 0 .
       PERFORM update_error_log USING wa_data
                                           text-002.
    delete it_data-objek .
         else.
      read table it_mara into wa_mara with key  matnr = wa_ausp-objek .
           if sy-subrc EQ 0 .
           wa_data-objek = wa_mara-matnr.
           wa_data-matkl = wa_mara-matkl.
         ENDIF.
         Modify it_data from wa_data  .
      endif.
    *endloop.
    Validate unit of measure (unit)
        READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-003.
        endif.
    Validate delivery location ( storage location )
        READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-001.
             if wa_data-flag ='x' .
          delete it_data from  wa_data .
        endif.
        ENDIF.
    endloop.

    Hi Naren,
    First get the index number of the IT_data table and store it in one variable whose declaration like this.
    data: tabix type sy-tabix.
    while reading the internal table it_data set the tabix variable.
    tabix = sy-tabix.
    Instead of  the above use below one.
    Delete it_data-objek
    Use the Below statement it will delete  the row from the internal table.
    Delete it_data-objek index tabix
    Thanks,
    Chidanand

  • How to delete  the record  of saved HRA Details...

    Hi Experts,
    I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
    When i m trying to delete it is showing  RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
    How can delete the record.
    Thanking u .
    Sai

    Hi
         Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
    Rajeshk

  • How to check the records that were inserted in a day?Please Help!

    HI All,
    How to check the records that were insterted in a day in a standard SAP table?
    For example : I want retrieve the records that were added in a day in WLK1 table.
    How do i do this?
    Urgent!! Please help!
    Thanks in advance!
    Sandeep Shenoy

    HI
        Changes to data within a table can be automatically logged. Such automatic logging of changes is called automatic table history. To turn on logging, tickmark the Log Data Changes check box on the Technical Settings screen
    IF THIS IS ALREADY DONE FOR A PARTICULAR TABLE, YOU CAN GET THE RECORD OF CHANGES THAT YOU MADE FOR THAT PARTICULAR TABLE AS EXPLAINED UNDER
    <a href="http://64.233.179.104/search?q=cache:pOdVy55jfAIJ:cma.zdnet.com/book/abap/ch06/ch06.htmHISTORYOFUPDATESINADAYINABAP&hl=en&gl=in&ct=clnk&cd=1">Automatic Table History and Change Documents</a>
    IF ITS HELPFUL PLEASE REWARD POINTS
    REGARDS
    ANOOP

  • How to check the records in Master Data Table?

    Hi,
       I am trying to load the Master Data Table using the Flat File.Now how to check the records in Master Data Table?
    I done the following way:
    Info Provider->Info Object->Right Click->Display Data or Maintain Master Data
    But it's not showing the records.It's asking like CID from......To......
                                                                        CID(SID)from.............To.......
                                                                         here CID means customer id(characteristic).
    and showing some settings.
    Please guide me.
    Thanks & Regards

    Hi Sri,
    Go to T- code RSD1 and type your info object name and open the P- table in the infoobject then select execute symbol to see the updated  data in to master data info object.
    regards
    sap

  • How to download the recorded video from my ipad to my PC ?

    How to download the recorded video from my ipad to my PC?

    See this support document for assistance. Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC - Apple Support

  • How to call the Jsp through BPM Obejct

    Hi,
    I have gone through the some topic, how to call the Jsp through BPM Object.
    I have followed step below,
    1. I have create the sample jsp page
    2. Import into BPM studio under webroot\custom Jsp
    3. Created the screenflow and added the "Interactive Component call" object
    4. Right Click the Object and selected Maintask and Implementation type as "BPM Object Interactive Call"
    5. Selected the use JSP presentation object option and when i click ok its showing "BPM instance object must be selected"
    But when i select the Instance Variable tab, its not showing anything.
    Can any one help me how to call the Jsp in screenflow with step by step procedure, that would be very greate help for me.
    Regards,
    Anandh P

    Hi,
    You are running a jsp report through rwservlet. In this case paper layout will be displayed. You have to deploy your jsp as web report to get the web layout. Please refer to the doc below, which describes how to deploy the web report.
    http://download-uk.oracle.com/docs/html/B10314_01/pbr_run.htm#1011901
    To run the jsp report, URL may look like
    http://www.wwt.com/reports/<jsp name>?<parameter list>
    Hope this helps
    Vinayak

Maybe you are looking for

  • Can I use one infosource to update data to CUBE and ODS???

    Hi all, Can anyone tell me if I can load data to OSD and Cube from one the same InfoSource? As I know, I have to have "0recordmode"(update mode) in communication structure for ODS not for Cube.  So how can ODS and Cube use the same Infosucre to updat

  • Receive mail but can't send.

    I can access and send mail through the web but the 'home' application won't allow me to send emails because it won't accept my password. I can't figure out how to change my password. Each time I do I get sent in a spiral -- the password is the same o

  • Error in delivery process

    Hi guru i am pacing one error in sales order process in sap sd ,  i am sending  to the customere confarm quantity 5, this system teken 10 quantity in deliveries  , what happend , what will i do Edited by: Lakshmipathi on Jan 31, 2012 6:38 PM Thread L

  • I need help using Premier Pro CS5 to create a short time-lapse video . . .

    Hello I am new to Prremier Pro and need help creating a short time-lapse video. I have a Sony CyberShot TSC-70 and a Canon ZR930 to capture images and video but none do time-lapse automatically (I think). I also have Premier Elements 9 and Photoshop

  • Macbook pro bluetooth missing

    Hi I recently updated to Mountain Lion since then my bluetooth module has gone wonky. My Magic mouse connects but no longer scrolls. I have restarted and when I check the hardware info no bluetooth info is found and in the task bar at the top of the