- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
DESCRIBE TABLE name_org LINES count. "Кол-во организаций
DESCRIBE TABLE targ_pos LINES count1.
SORT name_org BY org.
* SORT targ_pos BY org sign_dk shkzg regn_doc.
IF count > 2.
SORT targ_pos BY shkzg org regn_doc.
ELSE.
SORT targ_pos BY shkzg org sign_dk regn_doc.
ENDIF.
LOOP AT targ_pos.
metka = sy-tabix.
IF count > 2.
CONCATENATE targ_pos-org targ_pos-shkzg INTO comp.
ELSE.
CONCATENATE targ_pos-org targ_pos-sign_dk targ_pos-shkzg
INTO comp.
ENDIF.
IF comp <> comp1.
IF metka <> 1.
WRITE: AT /pole sy-uline.
WRITE: AT /pole 'Итого: '.
IF s_nds IS NOT INITIAL.
WRITE: AT (14) snds UNDER targ_pos-nds NO-SIGN INPUT ON."<e1>
ENDIF.
WRITE: AT (15) ssum UNDER targ_pos-dmbtr NO-SIGN.
PERFORM ad_itog USING comp1(10)"targ_pos-org
shkzg
snds
ssum.
SKIP 1.
ENDIF.
IF count > 2.
READ TABLE name_org WITH KEY org = targ_pos-org BINARY SEARCH.
ELSE.
IF metka = 1.
READ TABLE name_org WITH KEY org = 'ABCDE' BINARY SEARCH.
ELSE.
READ TABLE name_org WITH KEY org = targ_pos-org
BINARY SEARCH.
ENDIF.
ENDIF.
org = name_org-name.CONDENSE org.
IF name_org-org NE 'ABCDE'.
CONCATENATE org '(' name_org-org ')' INTO org SEPARATED BY ''.
ENDIF.
IF count > 2 AND metka = 1.
READ TABLE name_org WITH KEY org = 'ABCDE' BINARY SEARCH.
CONCATENATE name_org-name '-' org INTO org SEPARATED BY space.
ENDIF.
WRITE: AT /pole 'Плательщик:', org. "name_org-name.
WRITE: AT /pole sy-uline.
WRITE: AT /pole text-002, ' ' NO-GAP,
text-003, ' ' NO-GAP, text-004, ' ' NO-GAP,
text-010, ' ' NO-GAP, text-005.
IF s_nds IS NOT INITIAL. "<e1>
WRITE: text-006 RIGHT-JUSTIFIED.
ELSE.
WRITE: ' '.
ENDIF.
WRITE: text-007 RIGHT-JUSTIFIED,
' ' NO-GAP, text-008.
WRITE: AT /pole sy-uline.
* SKIP 1.
snds = 0.
ssum = 0.
IF metka <> 1.
comp = comp1.
ENDIF.
ENDIF.
WRITE: AT /pole targ_pos-regn_doc HOTSPOT, ' ' NO-GAP,
targ_pos-regn_dat, ' ' NO-GAP,
targ_pos-acc_sch, ' ' NO-GAP,
targ_pos-n_doc(6), ' ' NO-GAP,
targ_pos-matkl(27) INPUT ON.
WRITE: AT (15) targ_pos-dmbtr NO-SIGN, ' ' NO-GAP, targ_pos-hkont.
HIDE: targ_pos-regn_doc, targ_pos-gjahr.
shkzg = targ_pos-shkzg.
if lv_flag is not initial.
ADD targ_pos-nds TO snds.
endif.
ADD targ_pos-dmbtr TO ssum.
IF count > 2.
CONCATENATE targ_pos-org targ_pos-shkzg INTO comp1.
ELSE.
CONCATENATE targ_pos-org targ_pos-sign_dk targ_pos-shkzg
INTO comp1.
ENDIF.
IF metka = count1.
WRITE: AT /pole sy-uline.
WRITE: AT /pole 'Итого: ',
* AT (14) snds UNDER targ_pos-nds NO-SIGN INPUT ON,
AT (15) ssum UNDER targ_pos-dmbtr NO-SIGN.
PERFORM ad_itog USING comp1(10) "targ_pos-org
shkzg
snds
ssum.
ENDIF.
ENDLOOP.
Расширьте, пожалуйста, список доступных языков для говнокода.
guest 10.03.2009 15:06 # +1
мда, абап тяжеловато читать с непривычки, может подскажите куда именно смотреть?
guest 10.03.2009 17:07 # 0