Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Is it correct loop? The values are coming same for the field(txt50).

$
0
0

types: begin of ty_desc,

       saknr type saknr,

       txt50 type char50,

  end of ty_desc.

 

 

TYPES: BEGIN OF itycj_postings.

include type ty_desc.

TYPES: END OF itycj_postings.

 

 

data:  titcj_split_postings TYPE itycj_postings OCCURS 0 WITH HEADER LINE.

 

 

SELECT SINGLE * FROM tcj_c_journals

    INTO ls_journals

    WHERE comp_code  = sd_bukrs

      AND cajo_number = sd_canum.                        "Hw 0502865

 

 

  If Sy-subrc ne '0'.                                    "Hw 494272

     MESSAGE I011(F5A) WITH Sd_canum sd_bukrs.            "Hw 502865

     exit.                                                "Hw 494272

   Endif.                                                 "Hw 494272

 

 

 

select single * from tcj_transactions

  into ls_transaction

  where comp_code = ls_journals-comp_code.

 

 

 

 

 

 

SELECT single *    

FROM skat

INTO ls_skat

WHERE spras EQ sy-langu

and saknr = ls_transaction-gl_account.    

 

 

 

LOOP AT titcj_split_postings.

 

if ls_skat-saknr EQ ls_transaction-gl_account.    

 

titcj_split_postings-txt50 = ls_skat-txt50.

endif.

append titcj_split_postings.

endloop

 

 

In output, the value of txt50 is all same. Please reply what to do?


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>