Skip to Content
0
Former Member
Jun 06, 2008 at 02:28 PM

doubt with z table

19 Views

Hi abapers,

Why the filed of the Z table in the code no refresh?

What is no correct, please?

  LOOP AT TAB1.

    MOVE TAB1-CAMPO(22) TO TAB2-CAMPO(22).
...
...
    MOVE TAB1-CAMPO+12(10) TO CUENTA.
    MOVE TAB1-CAMPO+22(24) TO OBJETO.

    SELECT SINGLE * FROM ZTT WHERE ZBUKRS EQ SOCI AND
                                         ZDHKONT LE CUENTA AND
                                         ZHHKONT GE CUENTA.
    IF SY-SUBRC = 0.
      MOVE ZTT-ZSRHKONT TO TAB2-CAMPO+12(10).
    ELSE.

      WRITE: / TEXT-100, CUENTA.
      MOVE CUENTA TO TAB2-CAMPO+12(10).
    ENDIF.

    IF ZTT-ZLIFNR NE ''. 
      clase_cta = 'K'.
     MOVE ZTT-ZUMSKZ TO TAB2-CAMPO+92(1)."
    ENDIF.

    MOVE clase_cta TO TAB2-CAMPO+91(1).

    SELECT SINGLE * FROM ZSRCO WHERE ZZOBJCTEOD LE OBJETO AND
                                     ZZOBJCTEOH GE OBJETO.
    IF SY-SUBRC = 0.

      MOVE ZSRCO-ZZOBJCTED TO TAB2-CAMPO+22(24).
    ELSE.
      MOVE OBJETO TO TAB2-CAMPO+22(24). 

      WRITE: / TEXT-101, OBJETO.
    ENDIF.

    IF TAB2-CAMPO+22(24) EQ '                        '.

      MOVE '000000000000000000000000' TO TAB2-CAMPO+22(24).
    ENDIF.

    APPEND TAB2.

  ENDLOOP.

Cordial greetings.