<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: program to populate the database table and to update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764606#M643727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that it's reasonable to ask on this forum to review the whole program. People get paid by an hour for that, you know. I'd suggest to run it in Debugger and identify the step where it's failing and, if you still have questions after that, feel free to ask, but be more specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something that just caught my attention - in your opinion, what exactly does this code do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;update ZYBKP set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2007 20:47:28 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2007-08-29T20:47:28Z</dc:date>
    <item>
      <title>program to populate the database table and to update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764605#M643726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1)	Query  LQUA &amp;#150; for the EDATU ( Today&amp;#146;s date) Time (EZEIT) for the last 20 minutes from the current time. &lt;/P&gt;&lt;P&gt;2)	Extract all the LQUA-MATNR for the warshe ( 754) plant 0054 sloc - LGORT. Also, extract SUID ( LENUM) and available quantity (VERME) , Storage bin - LGPLA. Store them in the internal table ( Only the confirmed TO). The -LEIN-STATU should be blank .  or LQUA-VERME should not be blank. &lt;/P&gt;&lt;P&gt;3)	In the previous step the REMAN data was extracted for the use in the next steps. &lt;/P&gt;&lt;P&gt;4)	Compare the LQUA-MATNR with the REMAN material no ( From Custom table ZCORE_1 &amp;#150; Relation ship matrix) &lt;/P&gt;&lt;P&gt;5)	Extract the records  which are matching and also add the Dummy finish part from the custom table ZCORE_1 in the internal table&lt;/P&gt;&lt;P&gt;6)	Call BAPI- BAPI_GOODSMVT_CREATE ( movement type- 919) to process material to material transfer. Receiving material is &amp;#150; Dummy finish part no , rcvng sloc and rcvng plant are the same as REMAN. ( plant 0054)&lt;/P&gt;&lt;P&gt;7)	Get the material document created from the previous step and store it&lt;/P&gt;&lt;P&gt;8)	Query table &amp;#150; LUBU  by LUBU-MBLNR ( mat doc no from previous step), LUBU-BDATU ( Today&amp;#146;s date), LUBU-BWART ( 919) and extract the posting change no ( LUBU-UBNUM). &lt;/P&gt;&lt;P&gt;9)	Use the function module - L_TO_Create_Posting_Change with the (LUBU-UBNUM) created in the previous step. Use 922 (TR-ZONE) for the source bin to process the posting change  ( use the information of the SUID, Source bin, SUT type etc from step 1)&lt;/P&gt;&lt;P&gt;10)	Populate the table &amp;#150; ZCORE_2 with the processed items. REMAN no, Qty, SU ID, Dummy finish part, CAM serial no. The CAM serial no is extracted form the BCS interface table ZY310 ( by querying against the REMAN / SU Id no)&lt;/P&gt;&lt;P&gt;Note: The Vrgn Bld flag is maintained for the vrgn bld process ( Refere functional spec &amp;#150; Mat to mat transfer_Rework and Vrgn.doc)&lt;/P&gt;&lt;P&gt;11)	Collect the Record information form the previous step, Change the BCS  table fields MATNR and ZBARCODE = concatenate BCS|MATNR|EXIDV02  with the dummy part no in for the following tables - ZYBKP, ZY310 , ZYBCS_LOT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR THE ABOVE TASK,  I WRITTEN THE BELOW PROGRAM, IT IS SYNTATICALL CORRECT, BUT I'M NOT GETTING THE RESULT, CAN ANY CORRECT THIS PROGRAM&lt;/P&gt;&lt;P&gt;REPORT  ZMVMOOPI  LINE-SIZE  132&lt;/P&gt;&lt;P&gt;                 LINE-COUNT 60&lt;/P&gt;&lt;P&gt;                 NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                      T A B L E S                                    *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;Tables:  LQUA,&lt;/P&gt;&lt;P&gt;         ZCORE_2,&lt;/P&gt;&lt;P&gt;         ZCORE_ITEM,&lt;/P&gt;&lt;P&gt;         ZCORE_HEADER,&lt;/P&gt;&lt;P&gt;         LUBU,&lt;/P&gt;&lt;P&gt;         ZY310,&lt;/P&gt;&lt;P&gt;         ZYBKP,&lt;/P&gt;&lt;P&gt;         ZYBCS_LOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_time TYPE sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Input Parameters    P A R A M E T E R S                              *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN begin of block b001 with frame title text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   PARAMETERS:  MATNR  LIKE LQUA-MATNR.&lt;/P&gt;&lt;P&gt;   PARAMETERS:  EDATU  LIKE SY-DATUM default sy-datum.&lt;/P&gt;&lt;P&gt;   PARAMETERS:  PLANT LIKE  LQUA-WERKS.&lt;/P&gt;&lt;P&gt;   PARAMETERS:  SUID  like  LQUA-LENUM.&lt;/P&gt;&lt;P&gt;   PARAMETERS: SLOC   LIKE  LQUA-LGORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   selection-screen end of   block b001.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 D A T A     D E F I N I T I O N                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;      MANDT LIKE LQUA-MANDT,&lt;/P&gt;&lt;P&gt;      MATNR  LIKE LQUA-MATNR,&lt;/P&gt;&lt;P&gt;      LENUM  LIKE LQUA-LENUM,&lt;/P&gt;&lt;P&gt;      VERME  LIKE LQUA-VERME,&lt;/P&gt;&lt;P&gt;      LGPLA  LIKE LQUA-LGPLA,&lt;/P&gt;&lt;P&gt;      LQNUM  LIKE LQUA-LQNUM,&lt;/P&gt;&lt;P&gt;      LGTYP  LIKE LQUA-LGTYP,&lt;/P&gt;&lt;P&gt;      PLPOS LIKE LQUA-PLPOS,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ZADUMMY      LIKE    ZCORE_HEADER-ADUMMY,&lt;/P&gt;&lt;P&gt;      ZUBNUM       LIKE          LUBU-UBNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  VAR1(3) TYPE C,&lt;/P&gt;&lt;P&gt;      VAR2(18) TYPE C,&lt;/P&gt;&lt;P&gt;      VAR3(17) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data:  GOODSMVT_HEADER type bapi2017_gm_head_01.&lt;/P&gt;&lt;P&gt;  data:  GOODSMVT_CODE   type bapi2017_gm_code.&lt;/P&gt;&lt;P&gt;  data: GOODSMVT_HEADRET  type bapi2017_gm_head_ret.&lt;/P&gt;&lt;P&gt;  data:  GOODSMVT_ITEM    type table of&lt;/P&gt;&lt;P&gt;                   bapi2017_gm_item_create with header line.&lt;/P&gt;&lt;P&gt;  data:  RETURN type bapiret2 occurs 0.&lt;/P&gt;&lt;P&gt;  data:  MATERIALDOCUMENT type  bapi2017_gm_head_ret-mat_doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: I_UBNUM LIKE LTAK-UBNUM,&lt;/P&gt;&lt;P&gt;        T_LUBQU LIKE LUBQU OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        L_TANUM LIKE LTAK-TANUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_zcore like ZCORE_2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           S T A R T   -   O F   -  S E L E C T I O N                *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_time = sy-uzeit - 1200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MANDT MATNR LENUM VERME LGPLA LQNUM LGTYP PLPOS FROM LQUA INTO&lt;/P&gt;&lt;P&gt;TABLE ITAB WHERE LGNUM = 754 AND&lt;/P&gt;&lt;P&gt;         WERKS = 0054 and EDATU = SY-DATUM AND EZEIT &amp;gt;= lv_time AND VERME &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select SINGLE ADUMMY from ZCORE_HEADER INTO ZADUMMY WHERE RMATNR = ITAB-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: XX_MVT_CODE(3).&lt;/P&gt;&lt;P&gt;  REFRESH: GOODSMVT_ITEM, RETURN.&lt;/P&gt;&lt;P&gt;  CLEAR:  GOODSMVT_ITEM, GOODSMVT_HEADER, RETURN,&lt;/P&gt;&lt;P&gt;  MATERIALDOCUMENT,  GOODSMVT_HEADRET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    XX_MVT_CODE = '919'.&lt;/P&gt;&lt;P&gt;    MOVE '04' TO GOODSMVT_CODE.&lt;/P&gt;&lt;P&gt;    MOVE SY-DATUM TO GOODSMVT_HEADER-PSTNG_DATE.&lt;/P&gt;&lt;P&gt;    MOVE SY-DATUM TO GOODSMVT_HEADER-DOC_DATE.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MATERIAL = ITAB-MATNR.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-PLANT = '0054'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-STGE_LOC = LQUA-LGORT.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-ENTRY_UOM = LQUA-MEINS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_TYPE = XX_MVT_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_MAT  = ZADUMMY.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_PLANT = '0054'.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_STLOC = LQUA-LGORT.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MOVE_REAS = ' '.&lt;/P&gt;&lt;P&gt;    GOODSMVT_ITEM-MVT_IND = ' '.&lt;/P&gt;&lt;P&gt;    APPEND GOODSMVT_ITEM.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                GOODSMVT_HEADER       = GOODSMVT_HEADER&lt;/P&gt;&lt;P&gt;                GOODSMVT_CODE         = GOODSMVT_CODE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        TESTRUN               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           IMPORTING&lt;/P&gt;&lt;P&gt;                GOODSMVT_HEADRET      = GOODSMVT_HEADRET&lt;/P&gt;&lt;P&gt;                MATERIALDOCUMENT      = MATERIALDOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           TABLES&lt;/P&gt;&lt;P&gt;                GOODSMVT_ITEM         = GOODSMVT_ITEM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               GOODSMVT_SERIALNUMBER = GOODSMVT_SERIALNUMBER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                RETURN                = RETURN&lt;/P&gt;&lt;P&gt;                .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          WAIT    = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        RETURN  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             .&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'DEQUEUE_ALL'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      _SYNCHRON       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT SINGLE UBNUM FROM LUBU INTO  ZUBNUM WHERE MBLNR = MATERIALDOCUMENT&lt;/P&gt;&lt;P&gt; AND BDATU = SY-DATUM AND BWART = '919'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    T_LUBQU-LQNUM = ITAB-LQNUM.&lt;/P&gt;&lt;P&gt;    T_LUBQU-NLTYP = ITAB-LGTYP.&lt;/P&gt;&lt;P&gt;    T_LUBQU-NLPLA = ITAB-LGPLA.&lt;/P&gt;&lt;P&gt;    T_LUBQU-NLENR = ITAB-LENUM.&lt;/P&gt;&lt;P&gt;    T_LUBQU-NPPOS = ITAB-PLPOS.&lt;/P&gt;&lt;P&gt;    T_LUBQU-SQUIT = 'X'.&lt;/P&gt;&lt;P&gt;    APPEND T_LUBQU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'L_TO_CREATE_POSTING_CHANGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        I_LGNUM                            = '754'&lt;/P&gt;&lt;P&gt;        I_UBNUM                            = ZUBNUM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LUBUI                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        I_SQUIT                            = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_NIDRU                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_DRUKZ                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LDEST                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_UPDATE_TASK                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_COMMIT_WORK                      = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BNAME                            = SY-UNAME&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SOLEX                            = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_PERNR                            = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        E_TANUM                            = L_TANUM&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        T_LUBQU                            = T_LUBQU&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T_LTAP_VB                          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  T_LTAK                             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       FOREIGN_LOCK                       = 1&lt;/P&gt;&lt;P&gt;       TP_COMPLETED                       = 2&lt;/P&gt;&lt;P&gt;       XFELD_WRONG                        = 3&lt;/P&gt;&lt;P&gt;       LDEST_WRONG                        = 4&lt;/P&gt;&lt;P&gt;       DRUKZ_WRONG                        = 5&lt;/P&gt;&lt;P&gt;       TP_WRONG                           = 6&lt;/P&gt;&lt;P&gt;       SQUIT_FORBIDDEN                    = 7&lt;/P&gt;&lt;P&gt;       NO_TO_CREATED                      = 8&lt;/P&gt;&lt;P&gt;       UPDATE_WITHOUT_COMMIT              = 9&lt;/P&gt;&lt;P&gt;       NO_AUTHORITY                       = 10&lt;/P&gt;&lt;P&gt;       I_UBNUM_OR_I_LUBU                  = 11&lt;/P&gt;&lt;P&gt;       BWLVS_WRONG                        = 12&lt;/P&gt;&lt;P&gt;       MATERIAL_NOT_FOUND                 = 13&lt;/P&gt;&lt;P&gt;       MANUAL_TO_FORBIDDEN                = 14&lt;/P&gt;&lt;P&gt;       BESTQ_WRONG                        = 15&lt;/P&gt;&lt;P&gt;       SOBKZ_MISSING                      = 16&lt;/P&gt;&lt;P&gt;       SOBKZ_WRONG                        = 17&lt;/P&gt;&lt;P&gt;       MEINS_WRONG                        = 18&lt;/P&gt;&lt;P&gt;       CONVERSION_NOT_FOUND               = 19&lt;/P&gt;&lt;P&gt;       NO_QUANTS                          = 20&lt;/P&gt;&lt;P&gt;       T_LUBQU_REQUIRED                   = 21&lt;/P&gt;&lt;P&gt;       LE_BULK_QUANT_NOT_SELECTABLE       = 22&lt;/P&gt;&lt;P&gt;       QUANT_NOT_SELECTABLE               = 23&lt;/P&gt;&lt;P&gt;       QUANTNUMBER_INITIAL                = 24&lt;/P&gt;&lt;P&gt;       KZUAP_OR_BIN_LOCATION              = 25&lt;/P&gt;&lt;P&gt;       DATE_WRONG                         = 26&lt;/P&gt;&lt;P&gt;       NLTYP_MISSING                      = 27&lt;/P&gt;&lt;P&gt;       NLPLA_MISSING                      = 28&lt;/P&gt;&lt;P&gt;       LGBER_WRONG                        = 29&lt;/P&gt;&lt;P&gt;       LENUM_WRONG                        = 30&lt;/P&gt;&lt;P&gt;       MENGE_WRONG                        = 31&lt;/P&gt;&lt;P&gt;       MENGE_TO_BIG                       = 32&lt;/P&gt;&lt;P&gt;       OPEN_TR_KZUAP                      = 33&lt;/P&gt;&lt;P&gt;       LOCK_EXISTS                        = 34&lt;/P&gt;&lt;P&gt;       DOUBLE_QUANT                       = 35&lt;/P&gt;&lt;P&gt;       QUANTITY_WRONG                     = 36&lt;/P&gt;&lt;P&gt;       OTHERS                             = 37&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move itab-mandt to t_zcore-MANDT.&lt;/P&gt;&lt;P&gt;    move ZADUMMY to t_zcore-ZDUMMY.&lt;/P&gt;&lt;P&gt;    move itab-MATNR to t_zcore-zrmatnr.&lt;/P&gt;&lt;P&gt;    SPLIT ZY310-ZBARCODE at '|' into VAR1 VAR2 VAR3.&lt;/P&gt;&lt;P&gt;    move  VAR3 to t_zcore-ZCAM.&lt;/P&gt;&lt;P&gt;    move  T_LUBQU-NLENR   to t_zcore-ZSUID.&lt;/P&gt;&lt;P&gt;    move itab-verme to t_zcore-ZQTY.&lt;/P&gt;&lt;P&gt;    move ' '  to t_zcore-zvrgn.&lt;/P&gt;&lt;P&gt;    move sy-datum to t_zcore-ZDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND t_zcore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    update  ZCORE_2 FROM table t_zcore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update ZYBKP set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.&lt;/P&gt;&lt;P&gt;update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.&lt;/P&gt;&lt;P&gt;update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS FOR YOUR HELP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 20:24:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764605#M643726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T20:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: program to populate the database table and to update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764606#M643727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that it's reasonable to ask on this forum to review the whole program. People get paid by an hour for that, you know. I'd suggest to run it in Debugger and identify the step where it's failing and, if you still have questions after that, feel free to ask, but be more specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something that just caught my attention - in your opinion, what exactly does this code do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;update ZYBKP set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 20:47:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764606#M643727</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2007-08-29T20:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: program to populate the database table and to update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764607#M643728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thank you, i did debug the program, but i couldnt find and that logic is to update the field matnr in all the three database tables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 21:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764607#M643728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: program to populate the database table and to update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764608#M643729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update ZYBKP set MATNR = &amp;lt;b&amp;gt;zcore_2-ZDUMMY&amp;lt;/b&amp;gt; where matnr = &amp;lt;b&amp;gt;zcore_2-ZDUMMY&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.&lt;/P&gt;&lt;P&gt;update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;YOU ARE COMPARING SAME MATERIAL AND UPDATING WITH THE SAME..&amp;lt;/b&amp;gt; AND ALSO ZCORE_2 IS A DATABASE TABLE AND MAY NOT CONTAIN ANY VALUE AT THAT POINT... &lt;/P&gt;&lt;P&gt;in these statments you say that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update table set matnr = 'MATNR' WHERE MATNR = 'MATNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVEN THOUGH THIS STATMENT IS EXECUTED THERE WILL NOT BE ANY CHANGE IN THE TABLE... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 21:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764608#M643729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T21:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: program to populate the database table and to update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764609#M643730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But don't you see that it makes no sense whatsoever? It will not make any changes because you are looking for entries with value X and then are trying to update the same field with the same value. It's like IF X = X THEN X = X.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 21:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-populate-the-database-table-and-to-update/m-p/2764609#M643730</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2007-08-29T21:07:51Z</dc:date>
    </item>
  </channel>
</rss>

