Advertisement
Guest User

Untitled

a guest
Sep 5th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.55 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report ZTESTGAETAN
  3. *&---------------------------------------------------------------------*
  4. *&
  5. *&---------------------------------------------------------------------*
  6. REPORT ZTESTGAETAN.
  7.  
  8. DATA: it_table TYPE table of ZGAETAN_TEST,
  9.       wa_table TYPE ZGAETAN_TEST.
  10.  
  11. DATA :it_0002 type table of P0002,
  12.       wa_0002 type p0002,
  13.       it_0006 type table of P0006,
  14.       wa_0006 type p0006,
  15.       it_0001 type table of p0001,
  16.       wa_0001 type p0001,
  17.       it_0007 type table of P0007,
  18.       wa_0007 type P0007.
  19.  
  20. select  * from PA0002 into CORRESPONDING FIELDS OF table it_0002 WHERE begda <= sy-datum and ENDDA >= sy-datum.
  21.  
  22.   LOOP AT it_0002 INTO wa_0002.
  23.  
  24.       move wa_0002-pernr to wa_table-zmatricule.
  25.       move wa_0002-NACHN to wa_table-ZLASTNAME.
  26.       move wa_0002-VORNA to wa_table-ZFIRSTNAME.
  27.       move wa_0002-GBDAT to wa_table-ZBIRTHDAY_DATE.
  28.       move wa_0002-GBORT to wa_table-ZBIRTHPLACE.
  29.  
  30.       select single natio from t005t into wa_table-znationalite_txt where land1 = wa_0002-natio and spras = 'FR'.
  31.  
  32.         move wa_0002-NATIO to wa_table-ZNATIONALITE_TXT.
  33.  
  34.       select single * from pa0006 into CORRESPONDING FIELDS OF wa_0006 where pernr = wa_table-zmatricule and begda <= sy-datum and endda >= sy-datum.
  35.  
  36.         move wa_0006-stras to wa_table-zstreetandhouse.
  37.         move wa_0006-HSNMR to wa_table-ZHOUSENUMBER.
  38.         move wa_0006-PSTLZ to wa_table-ZPOSTALCODE.
  39.         move wa_0006-PSTLZ to wa_table-ZPOSTALCODE_TEXT.
  40.         move wa_0006-POSTA to wa_table-ZBOITE.
  41.         move wa_0006-ORT01 to wa_table-ZCITY.
  42.  
  43.       select single * from pa0001 into CORRESPONDING FIELDS OF wa_0001 where pernr = wa_table-zmatricule and begda <= sy-datum and endda >= sy-datum.
  44.  
  45.      
  46.         move wa_0001-PERSG to wa_table-ZCATEGORIEEMPLOYEES.
  47.         move wa_0001-PERSK to wa_table-ZEMPLOYMENTSTATUS.
  48.         move wa_0001-werks to wa_table-ZDOMAIN.
  49.         select single NAME1 from T500p into wa_table-ZDOMAINTEXT where persa = wa_0001-werks.
  50.         move wa_0001-BTRTL to wa_table-ZSSDOMAIN.
  51.         select single BTEXT from T001P into wa_table-ZSSDOMAIN_TEXT where BTRTL = wa_0001-BTRTL.
  52.         move wa_0001-plans to wa_table-ZPOSTE.
  53.        
  54.       select single * from pa0007 into CORRESPONDING FIELDS OF wa_0007 where pernr = wa_table-zmatricule and begda <= sy-datum and endda >= sy-datum.
  55.         move wa_0007-SCHKZ to wa_table-ZWORKSCHEDULE.
  56.         move wa_0007-ARBST to wa_table-ZHOURS.
  57.         move wa_0007-BEGDA to wa_table-ZBEGINDATE.
  58.   ENDLOOP.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement