Updating VBSEGK-XREF3

HI All
We have client requirement to update MM parked invoice. We need to update XREF3 field of Parked Invoice ( Table : VBSEGK). please note that we have update MM praked invoice ( not to create)
The XREF3 field is not appearing on screen( so we cannot use BDC).
We are looking for some BAPI function module which will update MM parked invoice.
Please send your inputs. Thanks for your support.
Regards
Ravindra

Hi, In PO if GR-Based IV is checked then XREF3 will get filled for the GR/IR Account item for the material, But for Freight condition item it will not be filled, If GR-Based IV is not set, then it will not get filled, It is SAP standard.
Check below link for making enhacement for your requirement,
[Field XREF3|http://forums.sdn.sap.com/thread.jspa?messageID=9764105#9764105]

Similar Messages

  • FB02- update XREF3 fields for G/L account also

    Hi all,
       My requirement is to update the XREF3-> fields using transaction FB02 for the all accounts (Customer, G/L , Vendor) I have used Function module FI_DOCUMENT CHANGE whcih is updating the XREF -> fields for only Customer account.I want update it for G/L account also...Can anybody tell me the solution other than BDC call transaction..
    Thanks in Advance,
    Lakshmi

    Yes, but that's a correct answer.  Perhaps your config still isn't correct.  Field display is controlled at two levels in FI documents, by the field status of the posting key and by the field status group assigned to the account.  Most likely, you also don't have the field configured as a changeable field at the line item level.

  • XREF3 field is updating in GR/IR Mtl Clrg A/c but not in GR/IR Freight Clrg

    Hi Experts,
    When I run F.13 with selection of GR/IR accounts and with tick of GR/IR special purpose. only GR/IR Matrl Clearing account is clearing based on the XREF3 but GR/IR freight clearing is not happening, When i checked the MIRO document found that IR for the freight invoices is not updating with XREF3 field. Can i know what could be the reason and also the solution for it.
    YJ

    Hi, In PO if GR-Based IV is checked then XREF3 will get filled for the GR/IR Account item for the material, But for Freight condition item it will not be filled, If GR-Based IV is not set, then it will not get filled, It is SAP standard.
    Check below link for making enhacement for your requirement,
    [Field XREF3|http://forums.sdn.sap.com/thread.jspa?messageID=9764105#9764105]

  • BSEG Table update

    Hi All,
    My requirement is like that, Whenever I do the posting I want to update the BSEG Table field xref3.Please suggest is there any BTE exist for this.
    Points are surely awarded.
    Thanks
    Garg

    Hi All,
    I have found the following BTE to update the xref3 field of BSEG table with LIFNR.
    Even OPEN_FI_PERFORM_00001020_E...Even I have implement that BTE in my copy function module with the folowing code
    DATA : V_LIFNR LIKE BSEG-LIFNR.
      READ TABLE T_BSEG WITH KEY KOART = 'K'.
      IF SY-SUBRC = 0.
        V_LIFNR = T_BSEG-LIFNR.
        LOOP AT T_BSEG.
          T_BSEG-XREF3 = V_LIFNR.
          MODIFY T_BSEG.
        ENDLOOP.
      ENDIF.
    Whenever i simulate the posting
    But problem exist in the BTE OPEN_FI_PERFORM_00001020_E
    Becoz in this BTE code is like that in line, first the T_BSEG table entries get saved with the old entries in table  L_BSEG[]
      EXPORT T_BSEG T_BKPF TO MEMORY ID MEMID.
       L_BSEG[]  = T_BSEG[].
    After that the code written in my FM execute and update the BSEG value successfully..
    And the most confusing code thing again the T_BSEG  table get again updated with the old entries of L_BSEG[]* 
    T_BSEG[]  = L_BSEG[].
    So the table does n't get updated with the required entries.
    Your suggestion is valuable.Points are surely awarded
    Thanks
    Garg

  • Enqueue for work item n deleted by called application

    Hi All
    We upgraded from 4.6C till ECC6.0 and from then we receive occasionaly messages in SM21: Enqueue for work item 000001198539 deleted by called application.
    This results in problems when 2 dialog task are executes after each other. Somethimes the second taks is not executed. I find in the log the following errors:
    - Temporary error in result processing of work item 000001199739
    - Error when loading component: Work item 000001198388 locked
    - Work item 000001198388 locked by user WF-BATCH (enqueue error)
    This is the head of the WF that's locked..
    We implemented all relevant OSS notes regarding the message, but still we receive those messages (notes 1040693 - 1050793 etc) We are on support package SAPKB70012.
    I have checked the code in our custom WF and in some background task we use a DEQUEUE_ALL. Can this be the problem? The WF worked perfectly in 4.6C.
      CALL FUNCTION 'ENQUEUE_EFBKPF'
       EXPORTING
    *   MODE_BKPF            = 'E'
    *   MANDT                = SY-MANDT
         bukrs                = i_bukrs
         belnr                = i_belnr
         gjahr                = i_gjahr
    *   X_BUKRS              = ' '
    *   X_BELNR              = ' '
    *   X_GJAHR              = ' '
    *   _SCOPE               = '2'
         _wait                = 'X'
    *   _COLLECT             = ' '
       EXCEPTIONS
         foreign_lock         = 1
         system_failure       = 2
         OTHERS               = 3
      IF sy-subrc <> 0.
        RAISE locked.
      ENDIF.
      UPDATE vbsegk SET zlspr = i_zlspr
                    WHERE ausbk = i_bukrs
                      AND belnr = i_belnr
                      AND gjahr = i_gjahr.
    *                and ( zlspr = 'A' or zlspr = 'Y' ) .
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'
           EXPORTING
                _synchron = 'X'.
    Any help appriciated
    Kristof

    The entries we have solved by removing the DEQUEUE_ALL function in a method.
    Still we receive somethimes errors in the workflow log
    Temporary error in result processing of work item <n>
    Message no. SWP030
    Error when loading component: Work item <n> locked
    Message no. SWP034
    Work item <n> locked by user WF-BATCH (enqueue error)
    Message no. WL605

  • Bapi to update fb02 reference field (xref3)

    Hi ,
    Please tell me the bapi which is used to update reference field xref3 into bseg for transaction fb02.

    Hi Alessandro Spadoni,
    Could you please tell the values you passed for CHANGE_DOCUMENT. I am unable to edit xref1, xref2 and xref3 in FB02

  • BAPI to update XREF3 in FB01

    Hi Gurus,
    Do you know some BAPI that can be use to update XREF3 field or the Reference Key 3 in FB01 using  (inbound) IDOC?
    Thanks!

    Hi,
    Thank you for your replies.
    My requirement is that i should pass the tax amount from segment E2EDP04-MWSBT to XREF3 (reference field 3) in FB01. Im using FM: MRM_INVOICE_POST in posting.
    Is there any BAPI which can be use to update XREF3? or is there a user-exit that can be use to access ACCIT which have the XREF3 field?
    Thank you.
    Edited by: saixis on Jul 27, 2011 2:32 PM

  • BSEG-XREF3 is not updating

    Hello All,
    I have implemetated customer Exit namely  EXIT_SAPLV60B_004 to modify the field  XACCIT-XREF3.
    As per my understanding what ever data we have in XACCIT will be comitted to BSEG table.
    But the field (XREF3) which I am modify from this exit is not reflecting in the BSEG table (Field XREF3 ).
    I am not sure what setting I am missing.
    Kindly help.
    Regards
    Sachin

    Hi sachin.
    Yes, BSEG is a cluster table. I'm not sure about adding new field in account document. But I think it works only for account lines. Not client and vendor lines. Its a configuration in SPRO. It's not enhancement in BSEG. It's a configuration which SAP adds automatcly during document processing I think. This solution did not work fine too, because it's not to all kinds of items in acc docs.
    About the implicity enhancement point, I'll try to get the include name and form name to give you. I don't have it now and have to search im my ABAP documentations.
    But be aware this field XREF3 is filled or cleared by SAP (to some kind of documents) after the substitution. Be careful, because SAP uses this field to some standard processes or to rastreability cases. You may have problems with some kind of documents if you change or clear this field value.  would try not use this solution of changing XREF3.
    But I'll try to find my documentation about the implicity enhancement point. If you want to find it, try debugging the standard when posting a document (after user click in SAVE button) and after substitution rule. Try to debug the standard and you will find out where the standard program change this value of XREF3.
    best regards.
    Glauco

  • How to update trading partner (BSEG-VBUND) in tr.code FB01/FB02?

    Hi,
    I need, under some circumstances, to update value of trading partner code (field BSEG-VBUND) to all items in the FI document, created/changed with transaction FB01/FB02.
    I checked available user exits and bussiness events, but didn't found one, which could do the trick.
    In fact, in bussiness transaction event #00001430 (CHANGE DOCUMENT: Field substitution header/line - Checks prior to posting change completed) - for FB02 I have access to the internal table T_BSEG, but it seems this table is used as import parameter only and any changes didn't take efect at the end.
    Any help how can I do the trick? And this is while I'm in a transaction FB01/FB02.
    My system is 4.6c.
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev

    Svetlin, Max,
    what I did until now is:
    1) followed matrix substitution = callup point 3 (complete document) - I checked for existance of correct substitution field(s) in the GB01 table, and re-generated substitution code (as noticed in note 42615). That added my field in the list of fields for substtitution which are considered at the end of substtitution - in forms:
    FORM EXP_REC_015                      
            USING                        
              DATA_CHANGED TYPE GB002_015
            CHANGING                     
              DATA_OUT TYPE GB002_015.
    and
    FORM EXP_TAB_015_BSEG                   
             USING                          
               IN_ORIG STRUCTURE        BSEG
            CHANGING                        
               OUT_RESULT STRUCTURE     BSEG
               B_RESULT.
    both forms are in main generated program GBTAAFI0.
    My field (VBUND) is taken in account - added to the structure:
    DATA:  BEGIN OF TEMP_STRUCT,                          
            VBUND                          LIKE   BSEG-VBUND
            ZFBDT                          LIKE   BSEG-ZFBDT
            END OF TEMP_STRUCT.                            
    here ZFBDT was the other field defined in GB01 for substitution from someone esle - perhaps by default, I don't know.
    Further (in the include MF05LFB0),
    almost all of the structures which contain my changes are cleared (below is extract from the code):
    LOOP AT beltab WHERE xarch NE char_x.                   "Note 0383125
    REFRESH xbseg.                                                     
      REFRESH ybseg.                                                     
      REFRESH xbsec.                                                     
      REFRESH ybsec.                                                     
      REFRESH xbsed.                                                     
      REFRESH ybsed.                                                     
      REFRESH xbset.                                                     
      REFRESH ybset.                                                     
      REFRESH t_bsegco.                                                  
      REFRESH t_fmfich.                                                  
    Further, the logic proceed with the program SAPFF011 and form 'import_*beleg', where my changes were overwritten with original data - before substitution.
    2) Tried Max's proposal - and extended structure BSEG_SUBST with field VBUND, further populated the substitution table in the related BTE 1430 accordingly.
    Unfortunately the flow-logic proceeded further to the same form 'import_*beleg' in the program SAPFF011 and my changes dissapeared.
    I'm at dead-end - have no idea where and what is the problem...
    Checked few OSS notes - 42615, 386896, 513891, 391309, 438076. Everything which is related to my exact situation is set correctly - as far as I found :-).
    Just for tests I tried both ways (BTE and matrix substitution) with another field ==> BSEG-XREF3, and it was updated correctly - accorging to my logic.
    Thanks guys, your suggestions were right at the time and valuable, but they didn't help me to solve my problem. Perhaps there is something messed in our system - I can't be sure. What I can say for sure is that we have working BTE-s (1430 is used in our system - I just added piece of code into it), and validations are working also.
    Thanks again.
    Regards,
    Ivaylo
    P.S. If you have any suggestions, I'll be glad to hear them from you.

  • Document number not updating in the document

    hi gurus,
    this is a excise invoice voucher form used by the client .
    some values are not updated in document no.
    could someone tell me why it is not updating.
    if there are any corrections in code pls update me and solve my problem.
    urs
    pradeep.r
    *&  Include           ZFI_PAY_ADVICE_F01_STR_2                         *
    *&      Form  select_data
          text
    -->  p1        text
    <--  p2        text
    FORM SELECT_DATA .
      REFRESH IT_BKPF.
      CLEAR   IT_BKPF.
      SELECT BELNR GJAHR XBLNR BLDAT BLART INTO CORRESPONDING FIELDS OF
      TABLE IT_BKPF FROM BKPF
      WHERE BELNR IN S_BELNR
      AND   GJAHR IN S_GJAHR
      AND   BUKRS IN S_BUKRS.
      IF IT_BKPF[] IS INITIAL.
        MESSAGE S001.
      ENDIF.
      SORT IT_BKPF BY BELNR GJAHR.
      LOOP AT IT_BKPF.
        SELECT SINGLE EBELN WRBTR WERKS LIFNR KUNNR  INTO
        (IT_BKPF-ZUONR,IT_BKPF-WRBTR,IT_BKPF-WERKS,IT_BKPF-LIFNR,IT_BKPF-KUNNR)
        FROM BSEG
        WHERE BELNR = IT_BKPF-BELNR
        AND   GJAHR = IT_BKPF-GJAHR
        AND BUKRS IN S_BUKRS
        AND   KOART = 'K'.
        IF NOT IT_BKPF-LIFNR IS INITIAL.
          DATA : WRK_ADRNR LIKE LFA1-ADRNR.
          CLEAR  WRK_ADRNR.
          SELECT SINGLE ADRNR INTO WRK_ADRNR FROM LFA1
          WHERE LIFNR = IT_BKPF-LIFNR.
          SELECT SINGLE NAME1
                        NAME2
                        NAME3
                        NAME4
                        CITY1
                        REGION
                        COUNTRY
                        STREET
         INTO (IT_BKPF-NAME1,IT_BKPF-NAME2,IT_BKPF-NAME3,IT_BKPF-NAME4,
         IT_BKPF-CITY1,IT_BKPF-REGION,IT_BKPF-COUNTRY,IT_BKPF-STREET)
         FROM ADRC
         WHERE ADDRNUMBER EQ WRK_ADRNR.
    Text for Country
          SELECT SINGLE LANDX INTO IT_BKPF-LANDX FROM T005T
          WHERE LAND1 = IT_BKPF-COUNTRY
          AND   SPRAS EQ SY-LANGU.
    Text for Region
          SELECT SINGLE BEZEI INTO IT_BKPF-BEZEI FROM T005U
          WHERE BLAND = IT_BKPF-REGION
          AND   SPRAS EQ SY-LANGU
          AND   LAND1 = IT_BKPF-COUNTRY.
        ENDIF.
        IF NOT IT_BKPF-KUNNR IS INITIAL.
          CLEAR  WRK_ADRNR.
          SELECT SINGLE ADRNR INTO (WRK_ADRNR) FROM KNA1
          WHERE KUNNR = IT_BKPF-KUNNR.
          SELECT SINGLE NAME1
                        NAME2
                        NAME3
                        NAME4
                        CITY1
                        REGION
                        COUNTRY
                        STREET
         INTO (IT_BKPF-NAME1,IT_BKPF-NAME2,IT_BKPF-NAME3,IT_BKPF-NAME4,
         IT_BKPF-CITY1,IT_BKPF-REGION,IT_BKPF-COUNTRY,IT_BKPF-STREET)
         FROM ADRC
         WHERE ADDRNUMBER EQ WRK_ADRNR.
    Text for Country
          SELECT SINGLE LANDX INTO IT_BKPF-LANDX FROM T005T
          WHERE LAND1 = IT_BKPF-COUNTRY
          AND   SPRAS EQ SY-LANGU.
    Text for Region
          SELECT SINGLE BEZEI INTO IT_BKPF-BEZEI FROM T005U
          WHERE BLAND = IT_BKPF-REGION
          AND   SPRAS EQ SY-LANGU
          AND   LAND1 = IT_BKPF-COUNTRY.
        ENDIF.
        MODIFY IT_BKPF.
      ENDLOOP.
      REFRESH IT_DATA.
      CLEAR   IT_DATA.
      LOOP AT IT_BKPF.
        DATA : WRK_BSAKBELNR LIKE BSAK-BELNR.
        CLEAR  WRK_BSAKBELNR.
        SELECT SINGLE BELNR INTO WRK_BSAKBELNR FROM BSAK
        WHERE AUGBL = IT_BKPF-BELNR
        AND   GJAHR = IT_BKPF-GJAHR
        AND BUKRS IN S_BUKRS.
    Advance
        IF WRK_BSAKBELNR IS INITIAL.
          IT_DATA-VBELNR = IT_BKPF-BELNR.
          IT_DATA-BELNR = IT_BKPF-BELNR.
          IT_DATA-GJAHR = IT_BKPF-GJAHR.
          IT_DATA-XBLNR = IT_BKPF-XBLNR.
          IT_DATA-BLDAT = IT_BKPF-BLDAT.
          IT_DATA-BLART = IT_BKPF-BLART.
          IT_DATA-ZUONR = IT_BKPF-ZUONR.
          IT_DATA-WRBTR = IT_BKPF-WRBTR.
          IT_DATA-WRBTRC = IT_DATA-WRBTR.
          APPEND IT_DATA.
          IT_DATA-VBELNR = IT_BKPF-BELNR.
          IT_DATA-BELNR = ' '.
          IT_DATA-GJAHR = ' '.
          IT_DATA-BLDAT = ' '.
          IT_DATA-BLART = ' '.
          IT_DATA-ZUONR = ' '.
    TDS
          DATA : WRK_TDSWRBTR LIKE BSIS-WRBTR.
          CLEAR  WRK_TDSWRBTR.
          SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSIS
          WHERE BELNR = IT_BKPF-BELNR
          AND   GJAHR = IT_BKPF-GJAHR
          AND BUKRS IN S_BUKRS
          AND   QSSKZ NE SPACE
          AND   QSSKZ NE 'XX'
          AND   XREF3 NE SPACE
          AND   QSSKZ NE 'S1'
          AND   QSSKZ NE 'S2'.
          IF WRK_TDSWRBTR IS INITIAL.
            SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSAS
            WHERE BELNR = IT_BKPF-BELNR
            AND   GJAHR = IT_BKPF-GJAHR
            AND   QSSKZ NE SPACE
            AND   QSSKZ NE 'XX'
            AND   XREF3 NE SPACE
            AND BUKRS IN S_BUKRS
            AND   QSSKZ NE 'S1'
            AND   QSSKZ NE 'S2'.
          ENDIF.
          DATA : WRK_BSCHL LIKE BSIS-BSCHL.
          CLEAR  WRK_BSCHL.
          IF NOT WRK_TDSWRBTR IS INITIAL.
            IT_DATA-XBLNR = 'TDS/ECess'.
            IT_DATA-WRBTR = WRK_TDSWRBTR.
            SELECT SINGLE BSCHL INTO WRK_BSCHL FROM BSIS
            WHERE BELNR = IT_BKPF-BELNR
            AND   GJAHR = IT_BKPF-GJAHR
            AND   QSSKZ NE SPACE
            AND BUKRS IN S_BUKRS
            AND   QSSKZ NE 'XX'
            AND   XREF3 NE SPACE
            AND   QSSKZ NE 'S1'
            AND   QSSKZ NE 'S2'
            AND   BSCHL = '40'.
            IF WRK_BSCHL IS INITIAL.
              SELECT SINGLE BSCHL INTO WRK_BSCHL FROM BSAS
              WHERE BELNR = IT_BKPF-BELNR
              AND   GJAHR = IT_BKPF-GJAHR
              AND   QSSKZ NE SPACE
              AND   QSSKZ NE 'XX'
              AND   XREF3 NE SPACE
              AND BUKRS IN S_BUKRS
              AND   QSSKZ NE 'S1'
              AND   QSSKZ NE 'S2'
              AND   BSCHL = '40'.
            ENDIF.
            IF WRK_BSCHL IS INITIAL.
              IT_DATA-WRBTR = IT_DATA-WRBTR * - 1.
            ENDIF.
            IT_DATA-WRBTRC = IT_DATA-WRBTR.
            APPEND IT_DATA.
          ENDIF.
          IT_DATA-VBELNR = IT_BKPF-BELNR.
          IT_DATA-BELNR = ' '.
          IT_DATA-GJAHR = ' '.
          IT_DATA-BLDAT = ' '.
          IT_DATA-BLART = ' '.
          IT_DATA-ZUONR = ' '.
    Discount
          DATA : WRK_DEDWRBTR LIKE BSIS-WRBTR.
          CLEAR  WRK_DEDWRBTR.
          SELECT SUM( WRBTR ) INTO WRK_DEDWRBTR FROM BSIS
          WHERE BELNR = IT_BKPF-BELNR
          AND   GJAHR = IT_BKPF-GJAHR
          AND   QSSKZ EQ SPACE
          AND BUKRS IN S_BUKRS
          AND   BSCHL NE '50'.
          IF NOT WRK_DEDWRBTR IS INITIAL.
            SELECT SUM( WRBTR ) INTO WRK_DEDWRBTR FROM BSAS
            WHERE BELNR = IT_BKPF-BELNR
            AND   GJAHR = IT_BKPF-GJAHR
            AND   QSSKZ EQ SPACE
            AND BUKRS IN S_BUKRS
            AND   BSCHL NE '50'.
          ENDIF.
          IF NOT WRK_DEDWRBTR IS INITIAL.
            IT_DATA-XBLNR = 'Discount'.
            IT_DATA-WRBTR = WRK_DEDWRBTR.
            IT_DATA-WRBTR = IT_DATA-WRBTR * - 1.
            IT_DATA-WRBTRC = IT_DATA-WRBTR.
            APPEND IT_DATA.
          ENDIF.
    Invoice
        ELSE.
          REFRESH IT_BELNR.
          CLEAR   IT_BELNR.
          DATA : W_YEAR(4),
                 W_MONTH(2) VALUE '04',
                 W_DATE(2) VALUE '01',
                 W_YEAR1(8).
          W_YEAR = S_GJAHR-LOW.
          CONCATENATE W_YEAR W_MONTH W_DATE INTO W_YEAR1.
          SELECT BELNR GJAHR XBLNR BLDAT BLART ZUONR WRBTR BSCHL INTO
          TABLE IT_BELNR FROM BSAK
          WHERE AUGBL = IT_BKPF-BELNR
                AND AUGDT GE W_YEAR1
              AND   GJAHR = IT_BKPF-GJAHR
                AND   BELNR NE IT_BKPF-BELNR
                AND BUKRS IN S_BUKRS.
          SORT IT_BELNR BY BELNR GJAHR.
          LOOP AT IT_BELNR.
            CLEAR  WRK_TDSWRBTR.
            SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSIS
            WHERE BELNR = IT_BELNR-BELNR
            AND   GJAHR = IT_BELNR-GJAHR
            AND   QSSKZ NE SPACE
            AND BUKRS IN S_BUKRS
            AND   QSSKZ NE 'XX'.
            IF WRK_TDSWRBTR IS INITIAL.
              SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSAS
              WHERE BELNR = IT_BELNR-BELNR
              AND   GJAHR = IT_BELNR-GJAHR
              AND   QSSKZ NE SPACE
              AND BUKRS IN S_BUKRS
              AND   QSSKZ NE 'XX'.
            ENDIF.
            IT_DATA-VBELNR = IT_BKPF-BELNR.
            IT_DATA-BELNR = IT_BELNR-BELNR.
            IT_DATA-GJAHR = IT_BELNR-GJAHR.
            IT_DATA-XBLNR = IT_BELNR-XBLNR.
            IT_DATA-BLDAT = IT_BELNR-BLDAT.
            IT_DATA-BLART = IT_BELNR-BLART.
            IT_DATA-ZUONR = IT_BELNR-ZUONR.
            IT_DATA-WRBTR = IT_BELNR-WRBTR + WRK_TDSWRBTR .
            IF IT_BELNR-BSCHL GE '31' AND IT_BELNR-BSCHL LE '39'.
              IT_DATA-WRBTRC = IT_DATA-WRBTR.
            ELSE.
              IF IT_BELNR-BSCHL GE '21' AND IT_BELNR-BSCHL LE '29'.
                IT_DATA-WRBTRC = IT_DATA-WRBTR * - 1.
              ENDIF.
            ENDIF.
            APPEND IT_DATA.
            IT_DATA-VBELNR = IT_BKPF-BELNR.
            IT_DATA-BELNR = ' '.
            IT_DATA-GJAHR = ' '.
            IT_DATA-BLDAT = ' '.
            IT_DATA-BLART = ' '.
            IT_DATA-ZUONR = ' '.
    TDSBELNR
            IF NOT WRK_TDSWRBTR IS INITIAL.
              IT_DATA-XBLNR = 'TDS/ECess'.
              IT_DATA-WRBTR = WRK_TDSWRBTR.
              CLEAR  WRK_BSCHL.
              IF NOT WRK_TDSWRBTR IS INITIAL.
                IT_DATA-XBLNR = 'TDS/ECess'.
                IT_DATA-WRBTR = WRK_TDSWRBTR.
                SELECT SINGLE BSCHL INTO WRK_BSCHL FROM BSIS
                WHERE BELNR = IT_BELNR-BELNR
                AND   GJAHR = IT_BELNR-GJAHR
                AND   QSSKZ NE SPACE
                AND   QSSKZ NE 'XX'
                AND   BSCHL = '40'.
                IF WRK_BSCHL IS INITIAL.
                  SELECT SINGLE BSCHL INTO WRK_BSCHL FROM BSAS
                  WHERE BELNR = IT_BELNR-BELNR
                  AND   GJAHR = IT_BELNR-GJAHR
                  AND   QSSKZ NE SPACE
                  AND   QSSKZ NE 'XX'
                  AND   BSCHL = '40'.
                ENDIF.
                IF WRK_BSCHL IS INITIAL.
                  IT_DATA-WRBTR = IT_DATA-WRBTR * - 1.
                ENDIF.
                IT_DATA-WRBTRC = IT_DATA-WRBTR.
                APPEND IT_DATA.
              ENDIF.
            ENDIF.
          ENDLOOP.
          IT_DATA-VBELNR = IT_BKPF-BELNR.
          IT_DATA-BELNR = ' '.
          IT_DATA-GJAHR = ' '.
          IT_DATA-BLDAT = ' '.
          IT_DATA-BLART = ' '.
          IT_DATA-ZUONR = ' '.
    TDSVBELNR
          CLEAR  WRK_TDSWRBTR.
          SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSIS
          WHERE BELNR = IT_BKPF-BELNR
          AND   GJAHR = IT_BKPF-GJAHR
          AND   QSSKZ NE SPACE
          AND BUKRS IN S_BUKRS
          AND   QSSKZ NE 'XX'
          AND   QSSKZ NE 'S1'
          AND   QSSKZ NE 'S2'.
          IF WRK_TDSWRBTR IS INITIAL.
            SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSAS
            WHERE BELNR = IT_BKPF-BELNR
            AND   GJAHR = IT_BKPF-GJAHR
            AND   QSSKZ NE SPACE
            AND   QSSKZ NE 'XX'
            AND   AUGBL = SPACE
            AND BUKRS IN S_BUKRS
            AND   QSSKZ NE 'S1'
            AND   QSSKZ NE 'S2'.
          ENDIF.
    **INSERTED BY PALANI ON 01.04.2006
          IF WRK_TDSWRBTR IS INITIAL.
            SELECT SUM( WRBTR ) INTO WRK_TDSWRBTR FROM BSIS
            WHERE BELNR = IT_BKPF-BELNR
            AND   GJAHR = IT_BKPF-GJAHR.
          ENDIF.
    ***END BY PALANI.
          IF NOT WRK_TDSWRBTR IS INITIAL.
            IT_DATA-XBLNR = 'TDS/ECess'.
            IT_DATA-WRBTR = WRK_TDSWRBTR.
            IT_DATA-WRBTR = IT_DATA-WRBTR * - 1.
            IT_DATA-WRBTRC = IT_DATA-WRBTR.
            APPEND IT_DATA.
          ENDIF.
          IT_DATA-VBELNR = IT_BKPF-BELNR.
          IT_DATA-BELNR = ' '.
          IT_DATA-GJAHR = ' '.
          IT_DATA-BLDAT = ' '.
          IT_DATA-BLART = ' '.
          IT_DATA-ZUONR = ' '.
    *DiscountVBELNR
          CLEAR  WRK_DEDWRBTR.
          SELECT SUM( WSKTO ) INTO WRK_DEDWRBTR FROM BSE_CLR
          WHERE BELNR_CLR = IT_BKPF-BELNR
          AND   GJAHR_CLR = IT_BKPF-GJAHR
          AND BUKRS IN S_BUKRS.
          IF NOT WRK_DEDWRBTR IS INITIAL.
            IT_DATA-XBLNR = 'Discount'.
            IT_DATA-WRBTR = WRK_DEDWRBTR.
            IT_DATA-WRBTR = IT_DATA-WRBTR * - 1.
            IT_DATA-WRBTRC = IT_DATA-WRBTR.
            APPEND IT_DATA.
          ENDIF.
        ENDIF.
      ENDLOOP.
    LOOP AT IT_BKPF.
      SELECT SINGLE BUTXT ORT01 LAND1 INTO (IT_DATA-BUTXT,IT_DATA-ORT01,IT_DATA-LAND1)
      FROM T001
      WHERE BUKRS IN S_BUKRS.
      MODIFY IT_DATA INDEX SY-TABIX.
    *ENDLOOP.
    ENDFORM.                    " select_data
    *&      Form  print_data
          text
    -->  p1        text
    <--  p2        text
    FORM PRINT_DATA .
      PERFORM OPEN_FORM.
      PERFORM WRITE_FORM.
      PERFORM CLOSE_FORM.
      LEAVE LIST-PROCESSING.
    ENDFORM.                    " print_data
    *&      Form  open_form
          text
    -->  p1        text
    <--  p2        text
    FORM OPEN_FORM .
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          FORM     = 'ZFI_PAY_ADV_MODN'
          LANGUAGE = SY-LANGU.
    ENDFORM.                    " open_form
    *&      Form  write_form
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_FORM .
      LOOP AT IT_BKPF.
        IF SY-TABIX GT 1.
          AT NEW BELNR.
            CALL FUNCTION 'WRITE_FORM'
              EXPORTING
                ELEMENT = 'NEW'
                WINDOW  = 'MAIN'.
          ENDAT.
        ENDIF.
        LOOP AT IT_DATA WHERE VBELNR = IT_BKPF-BELNR.
          DATA : BEGIN OF IT_HKONT OCCURS 0,
                   HKONT LIKE BSIS-HKONT,
                   WRBTR LIKE BSIS-WRBTR,
                 END OF IT_HKONT.
          REFRESH IT_HKONT.
          CLEAR   IT_HKONT.
          SELECT HKONT WRBTR INTO TABLE IT_HKONT FROM BSIS
          WHERE BELNR = IT_BKPF-BELNR
          AND   GJAHR = IT_BKPF-GJAHR.
          DELETE IT_HKONT WHERE HKONT(3) NE '005'.
          IF NOT IT_HKONT[] IS INITIAL.
            LOOP AT IT_HKONT.
              IT_DATA-TOTAL = IT_DATA-TOTAL + IT_HKONT-WRBTR.
              MODIFY IT_DATA.
            ENDLOOP.
          ELSE.
            IT_DATA-TOTAL = IT_DATA-TOTAL + IT_DATA-WRBTR.
            MODIFY IT_DATA.
          ENDIF.
        ENDLOOP.
        LOOP AT IT_DATA WHERE VBELNR = IT_BKPF-BELNR.
          IF IT_DATA-BLART EQ ''. " for invoice Date
            IT_DATA-BLDAT = IT_BKPF-BLDAT.
          ENDIF.
          IT_DATA-LIFNR = IT_BKPF-LIFNR.
          IT_DATA-KUNNR = IT_BKPF-KUNNR.
          IT_DATA-NAME1 = IT_BKPF-NAME1.
          IT_DATA-NAME2 = IT_BKPF-NAME2.
          IT_DATA-NAME3 = IT_BKPF-NAME3.
          IT_DATA-NAME4 = IT_BKPF-NAME4.
          IT_DATA-CITY1 = IT_BKPF-CITY1.
          IT_DATA-REGION = IT_BKPF-REGION.
          IT_DATA-COUNTRY = IT_BKPF-COUNTRY.
          IT_DATA-STREET = IT_BKPF-STREET.
          IT_DATA-LANDX = IT_BKPF-LANDX.
          IT_DATA-BEZEI = IT_BKPF-BEZEI.
          CLEAR : WRK_HBKID , WRK_BANKL.
          SELECT SINGLE CHECT ZALDT HBKID INTO
          (IT_DATA-CHECT , IT_DATA-ZALDT , WRK_HBKID)
          FROM PAYR
          WHERE VBLNR = IT_BKPF-BELNR
          AND   GJAHR = IT_BKPF-GJAHR
          AND   VOIDR = '00'.
          SELECT SINGLE BANKL INTO WRK_BANKL
          FROM T012
          WHERE HBKID = WRK_HBKID.
         AND spras EQ 'EN'.
          SELECT SINGLE BANKA INTO IT_DATA-BANKA
          FROM BNKA
          WHERE BANKL = WRK_BANKL.
          MODIFY IT_DATA.
          CALL FUNCTION 'WRITE_FORM'
            EXPORTING
              ELEMENT = 'ITEMS'
              WINDOW  = 'MAIN'.
        ENDLOOP.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT = 'TOTAL'
            WINDOW  = 'MAIN'.
      ENDLOOP.
    ENDFORM.                    " write_form
    *&      Form  close_form
          text
    -->  p1        text
    <--  p2        text
    FORM CLOSE_FORM .
      CALL FUNCTION 'CLOSE_FORM' .
    ENDFORM.                    " close_form

    Hi
    Could you tell us what fields are not updated?
    Regards,
    Raj

  • Mass update BSEG-XREF1

    Hi,
    Can anyone suggest FM or BAPI to mass update in BSEG-XREF1, BSEG-XREF2 and BSEG-XREF3 besides using BDC and FM FI_ITEMS_MASS_CHANG?
    I tried to avoid using tcode FB02 and that is the reason i don't want to use BDC and FM FI_ITEMS_MASS_CHANG.
    Thanks.
    Juli.

    I guess only BDC via transaction FB02 is the only way..

  • MIRO -additional filed XREF3

    Hi Team,
    Question:1
    We have requirement to add XREF3 field in MIRO/MIR7. Our ABAPer  activate the reference key filed .when we try to open this MIRO we can able to see the reference key field but after entering the PO this field not appearing  what is the reason for this . how can we make this field appear even after entering the PO ?
    Question: 2
    While updating information in this reference key 3 field in MIRO, it should be populate to FBl1n report . How can we get this date in FBl1n
    report? Is there any configuration settings required for.
    Thank you
    Regards,
    Rajesh.P

    Hi Team
    I have done the reference key make it optional for the below posting keys and gl accounts. and try to post the invoice . when enter the invoice I am able to see the reference key 3 . but when I enter the PO then this was disappear . please suggest . how can I use this field is visible even after enter the PO in MIRO .So that I can use this field for our requirement .
    Thanks
    Regards
    Raj

  • Program(BDC or BAPI) to change FB02 - xref3

    I want to write a program to change the fb02 xref3.
    Please let me know whether there is a BAPI? Or how to do it using the BDC cos in the BDC the page down is not capturing properly.
    Thanks
    Edited by: Ann G on Jan 3, 2008 7:33 AM

    Hi,
    Do u want to change xref3 for a particular document, or is this a routine job.
    if this is a one time activity , then write a prog to update bseg table with changed xref3 value.
    if this is a routine activity then call the document number in the recording and then click on
    more data  to change xref3.
    tc
    saji

  • Withholding Tax GL - Reference key 3 update

    Hi Experts,
    We are using only one GL account for Withholding tax payable. Our requirement is to update Reference key 3 (BSEG-XERF3) with WHT code and receipent type in withholding tax line item.
    Could you please let me know is there any Function module to update  Reference key 3.
    Thanks and regards
    Ram narsepalli

    Hi Ram,
    The XREF3 field in the BSEG table is getting updated through a
    function module J_1IEWT_DUEDATE Check the same.
    Regards,
    Anushya

  • Tecra M9-136 - BSOD during Vista SP2 update

    Tecra M9-136 asked this morning to update to Vista SP2 and during the process the BSOD 0x0000007E arrived. Restarted in Safe Mode and the installer continued and then finally reported that the update had failed - and reverted to SP1. This took most of the morning.
    It will start in Safe Mode but on a normal boot-up, Vista SP1 gets through the fingerprint recognition and then fails with the same BSOD (it doesn't get as far as displaying the desktop).
    The laptop has BIOS level 1.80. I've tried in Safe mode to install 1.90 but it tells me that the battery has insufficient charge and the power adapter isn't attached. Both untrue.
    Stuck - need advice. Could this be a hard fault? Can't see how I can update anything if it's a soft fault.
    thanks

    The message with the BSOD mentioned checking BIOS and driver versions. Anyway, no change made to that.,
    I tried System Restore but the only available restore point was the SP2 installation. I thought Vista was supposed to save a restore point every 24 hours even if nothing new had been installed.
    I've now found in System Information / Windows Error Reporting several messages like this:
    28/09/2009 12:08 Windows Error Reporting Fault bucket 0x7E_NULL_IP_DRVNDDM+57bd, type 0&#x000d;&#x000a;Event Name: BlueScreen&#x000d;&#x000a;Response: None&#x000d;&#x000a;Cab Id: 0&#x000d;&#x000a;&#x000d;&#x000a;Problem signature:&#x000d;&#x000a;P1: &#x000d;&#x000a;P2: &#x000d;&#x000a;P3: &#x000d;&#x000a;P4: &#x000d;&#x000a;P5: &#x000d;&#x000a;P6: &#x000d;&#x000a;P7: &#x000d;&#x000a;P8: &#x000d;&#x000a;P9: &#x000d;&#x000a;P10: &#x000d;&#x000a;&#x000d;&#x000a;Attached files:&#x000d;&#x000a;C:\Windows\Minidump\Mini0928 09-04.dmp&#x000d;&#x000a;C:\Users\me\AppData\Local\Te mp\WER-75660-0.sysdata.xml&#x000d;&#x000a;C:\Users\me\AppData\L ocal\Temp\WER7D78.tmp.version.txt&#x000d;&#x000a;& #x000d;&#x000a;These files may be available here:&#x000d;&#x000a;C:\Users\me\AppData\Local\Mic rosoft\Windows\WER\ReportArchive\Report06d1c4b5

Maybe you are looking for

  • Mac OS 10.9 WiFi Issue: Safe boot needed

    I started seeing a problem connecting to Wifi AP soon after the upgrade to 10.9.  (A similar thread exists on the discussion groups but not quite the same) Essentially the problem I see after having upgraded to OSX 10.9.4 is "Connecting to a new wifi

  • Oracle Database 11g-R2 with Windows Server 2008

    Hi to All Respected Gurus! Recently I have downloaded Oracle Database 11g-R2. Will it work with Windows Server 2008-R2? Please guid eme. Thanks in Advance. Muhammad Uzair Oracle Application Developer Oracle APEX Developer Pakistan +92 (333) 7058754

  • Preview opens very slowly

    Preview seems to be a little quirky. It takes a while to open a file (pdf) accross our server and frequently I'll need to try to open it 2 or 3 times. Anybody have this problem?

  • Read the content of mail, read the content of mail

    I receive my mail but can't read anymore the content. Do I have choice a wrong option ?

  • Web galleries--thumbs and large images not showing after uploading to server

    I have created 2 web galleries--one html and one Flash. I saved them to my local drive and they work perfectly. Then I uploaded to our server (I checked to see that all folders/files made it, and they did) and then when I access the index.html file,