Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Background Print

Former Member
0 Likes
582

Hi communty,

I've a problem with write command in background mode.

I have noticed that my internal table in background mode is initial but in foreground this is not initial and the report is correct.


  SORT tab_rec_sap BY conto_sist_pre.
  SORT tab_rec_sic BY f08.

  LOOP AT tab_rec_sic.
    READ TABLE tab_rec_sap WITH KEY conto_sist_pre = tab_rec_sic-f08.
    IF sy-subrc <> 0.
      WRITE: 'Utente ', tab_rec_sic-f08, ' non presente in SAP'.
      NEW-LINE.
    ELSE.
      IF tab_rec_sap-abi <> tab_rec_sic-abi.
        WRITE: 'Utente ', tab_rec_sic-f08, 'ABI ',tab_rec_sic-abi.
        WRITE:' non corrispondente'.
        NEW-LINE.
      ENDIF.
      IF tab_rec_sap-cab <> tab_rec_sic-cab.
        WRITE: 'Utente ', tab_rec_sic-f08, 'CAB                                                                                ',tab_rec_sic-cab.
        WRITE:' non corrispondente'.
        NEW-LINE.
      ENDIF.
    ENDIF.
  ENDLOOP.

Thank's regards.

Antonello

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
436

How is tab_rec_sic built?

Regards,

Rich Heilman

Read only

0 Likes
436

Hi,

Well,

data declaration of tab_rec_sic is:


DATA: BEGIN OF rec_sic,
        azienda(1)  TYPE c,
        anagr(16)   TYPE c,
        f01(16)     TYPE c,
        f02(60)     TYPE c,
        f03(40)     TYPE c,
        f04(10)     TYPE c,
        f05(10)     TYPE c,
        f06(5)      TYPE c,
        f07(40)     TYPE c,
        f08(16)     TYPE c,
        sott(60)    TYPE c,
        cf_sott(16) TYPE c,
        f10(16)     TYPE c,
        dispo_s(5)  TYPE c,
        f11(40)     TYPE c,
        data_r(10)  TYPE c,
        data_i(10)  TYPE c,
        f12(10)     TYPE c,
        dispo_r(5)  TYPE c,
        f13(40)     TYPE c,
        data_ev(10) TYPE c,
        data_rb(10) TYPE c,
        abi(5)      TYPE c,
        cab(5)      TYPE c,
        cc(12)      TYPE c,
      END OF rec_sic.


DATA: BEGIN OF rec_sap,
  conto(10),
  conto_sist_pre(16),
  pe(1),
  id(4),
  pse(2),
  abi(5),
  cab(5),
  cc(12),
  clcto(4),
END OF rec_sap.


DATA tab_rec_sap LIKE rec_sap OCCURS 0 WITH HEADER LINE.
DATA tab_rec_sic LIKE rec_sic OCCURS 0 WITH HEADER LINE.

while the parameter of print are correctily setting because if ask to the program a "write: 'TRY'."

this print into the spool.

The problem is resident in internal table.

Thank's everybody

Read only

Former Member
0 Likes
436

Have you set up the print parms for the job? This should not influence the contents of your internal table, nor the fact that you're running in background. Just a thought..