Write Spaces
Hi guys i m using titles to print any title but i need to put some spaces in both sides of the message , i was thinking in something like that :
concatenate space(20) 'welcome to' space(12) into tit
write tit.
but it doesnt work , how can i achive this ?
thanks.
>
Nitin Sikka wrote:
> Hi All,
>
> We can't concatenate SPACES with Concatinate statement. It will automatically removes the extra space.
> So here we need to shift space on the left and right side and then concatenate the work fields way i have given above.
>
> Regards,
>
> Nitin.
Actually we can concatenate spaces using the following;
CONCATENATE ld_one ld_two ld_three INTO ld_four RESPECTING BLANKS.
Regards,
Simon
Similar Messages
-
In Files, How to read and write spaces,tabs and newlines
Love..........
After having read a file into a string, when
I use this string in TextArea's setText()
method. Text Area do not care for spaces,tabs,
newlines. if I print same string using println()
out put has lines,spaces and tabs
----why-------
Similarly when I write to a file getting text
from Aextarea,out put file also produce same
result .First, if you would like to create a text area that wraps the text, instead of just running on and on, you need to specify, when creating the text area, that you do not want a horizontal scroll bar. For instance:
textArea = new TextArea("", 30, 60, TextArea.SCROLLBARS_VERTICAL_ONLY);
Why does println() cause a newline? Because println means print line... as in, it will print the text, then give a carriage return and line feed value, causing a new line to be created. -
MacBook pro continually writes spaces
Anyone had this problem ?
It'a a MBP 17" 2,33 GHz Intel Core Duo, given no particular problem up to now, and suddenly it's continually writing spaces, as if the cat was sitting on the keyboard...
Absolutely no unusual physical sign on the keyboard.
...and they are spaces, I've watched them in Text Edit. And they write even faster if I actually hold down the space bar, which makes me think the spacebar is not actually stuck.
This makes it impossible to enter a password, for example.Hi McAngelo,
Try resetting the SMC See link: http://support.apple.com/kb/HT1411
Also try resetting the PRAM see link: http://support.apple.com/kb/HT1379
Hope everything works out ok.
And did you try to do a whole shut-down of the system?
Please Keep us posted
Regards,
Andrew -
Regarding spaces in the last in of TXT file in the outbound interface
Hi ,
I am doing one outbound file, which will have 100 characters length, But last 25 characted i have to fill spaces. When i m trying to fill those 25 chatacters with spaces its not working, i tryed by creating a variabnle of 25 chracted space, still it is not working. Here below i gave the example program....
data: wa_detailed(100) type c.
wa_detailed+0(1) = 'suresh'.
wa_detailed+70(5) = 'welcom'.
wa_detailed+75(25) = ' ',.
append wa_detailed into ist_download.
This is my program, i m unable to fill those spaces.
can any one respond asap.
Thanks,
SureshIt may not be possible to append spaces in any of the variable. E.g. if you look at write statement, it does not allow us to write spaces. Instead, you can have an end of file character like '$' which is placed at 101st position. Look at the below code:
wa_detailed+0(1) = 'suresh'.
wa_detailed+70(5) = 'welcom'.
wa_detailed+100(1) = '$'.
This way you can transfer first 100 characters to the outbound file.
Let me know if you have any further queries.
Don't forget to mark helpful answers!
Gaurav Parmar. -
Sun Convergence - allow access with spaces as password
Hi,
We've discovered that Sun Convergence log in as any user when we write space sign without any other signs in password field. It's lok like ldap search (or bind) command fails if only spaces are in password field.
We use:
- Convergence with patch 12 and 10.
- Directory Server 5.2 (not recomennded, but on compatibile list)
We read some threards about similar problem with LDAP auth, but ... thera are not Sun Products. I suspect that problem are in LDAP (implementation Convergence requests).
We have temporary workaround, but ... it very bad. Any people have acces to any known user.
I woonder if some other have similar problem
regards
ITOracle does not comment on published reports of alleged Oracle product vulnerabilities. Please refer to Critical Patch Updates and Security Alerts (http://www.oracle.com/technology/deploy/security/alerts.htm) for more details on the policy.
Note: I still recommend you contact support for access to the latest Convergence patch (not yet available on SunSolve) which fixes known product vulnerabilities. -
F4IF_INT_TABLE_VALUE_REQUEST and first selection of mult
Hi All,
I am using F4IF_INT_TABLE_VALUE_REQUEST and it works well, except for the first time.This is a regular report type program.
o If one item/line is selected the first time, nothing is returned to the screen fields.
o If more than one item is selected, the first one is lost. The second and other lines make it back to the screen field.
o The actual values are not displayed until I right-click and select the 'multiple selection' option.
o The next multiple selects always returns correctly- Whatever is chosen makes it to the bottom of the screen field.
Using StepL or not does not seem to make a difference.
Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = RtField
dynpprog = l_prog
dynpnr = l_screen
dynprofield = specifichlpfld
Value_org = 'C'
WINDOW_TITLE = WinTitle
MULTIPLE_CHOICE = 'X'
TABLES
field_Tab = OutField_Tab
value_tab = OutUsrAddrs
RETURN_TAB = RETURN_TAB.
Thanks for any help,
Dan P.Hi All,
This is the code that shows the problem. It can be cut/pasted into a program for demostration.
*& Report YDMP_TRY2F4IN_INT_TABLE_VAL_RE *
*& Author: Daniel Perecky *
*& Test prg for function module call F4IF_INT_TABLE_VALUE_REQUEST. *
*& Works, kind of. *
*& o If one item/line is selected the first time, nothing is *
*& returned to the screen fields. *
*& o If more than one item is selected, the first one is lost. The *
*& second and other lines make it back to the screen field. *
*& o The actual values are not displayed until I right-click *
*& and select the 'multiple selection' option. *
*& o The next multiple selects always returns correctly- Whatever is *
*& chosen makes it to the bottom of the screen field. *
REPORT YDMP_TRY3F4IN_INT_TABLE_VAL_RE .
Tables: User_Addrs.
Selection-Screen Begin of Block EMAILN.
Selection-Screen Skip.
Selection-screen Begin of Line.
Selection-Screen Comment 1(25) Text-013.
Selection-screen End of Line.
Selection-screen Begin of Line.
Selection-Screen Comment 1(12) Text-015.
Selection-Screen Position 10.
Select-Options: GnrlF for USER_ADDRS-Name_First.
Selection-Screen Position 63.
Select-Options: GnrlL for USER_ADDRS-NAME_Last.
Selection-screen End of Line.
Selection-screen Begin of Line.
Selection-Screen Position 68.
Select-Options: GnrlSpMl for User_Addrs-BName.
Selection-screen End of Line.
Selection-Screen Skip.
Selection-Screen End of Block EMAILN.
Include type pool SSCR
TYPE-POOLS SSCR.
Define the object to be passed to the RESTRICTION parameter
DATA RESTRICT TYPE SSCR_RESTRICT.
DATA OPT_LIST TYPE SSCR_OPT_LIST.
DATA ASSRTD TYPE SSCR_***.
CLASS CX_RPTERR_EXCEPTION DEFINITIO
CLASS CX_RPTERR_EXCEPTION DEFINITION
INHERITING FROM CX_STATIC_CHECK.
ENDCLASS. "CX_RPTERR_EXCEPTION DEFINITIO
Initialization.
Used for function module: 'SELECT_OPTIONS_RESTRICT'
Clear Opt_List.
Move 'JUST_EQ' to Opt_List-Name.
Move 'X' to Opt_List-Options-Eq.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
Clear Opt_List.
Move 'NOINTERVLS' to Opt_List-Name.
Move 'X' to: Opt_List-Options-CP,
Opt_List-Options-EQ,
Opt_List-Options-GE,
Opt_List-Options-GT,
Opt_List-Options-LE,
Opt_List-Options-LT,
Opt_List-Options-NE,
Opt_List-Options-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
Clear Opt_List.
Clear Assrtd.
Move: 'B' to Assrtd-Kind,
'EMAILN' to Assrtd-Name,
'I' to Assrtd-SG_Main,
'N' to Assrtd-SG_Addy,
'JUST_EQ' to Assrtd-Op_Main,
'NOINTERVLS' TO Assrtd-OP_ADDY.
APPEND Assrtd TO RESTRICT-***_TAB.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = RESTRICT
DB = ' '
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
NOT_DURING_SUBMIT = 3
DB_CALL_AFTER_REPORT_CALL = 4
SELOPT_WITHOUT_OPTIONS = 5
SELOPT_WITHOUT_SIGNS = 6
INVALID_SIGN = 7
REPORT_CALL_AFTER_DB_ERROR = 8
EMPTY_OPTION_LIST = 9
INVALID_KIND = 10
REPEATED_KIND_A = 11
OTHERS = 12.
Exception handling
IF SY-SUBRC NE 0.
ENDIF.
Use same form for all three fields. Update all fields every time.
At Selection-Screen on Value-Request for GnrlF-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
At Selection-Screen on Value-Request for GnrlL-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
At Selection-Screen on Value-Request for GnrlSpMl-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
Start-of-Selection.
Try.
Some regular report code goes here.
Catch CX_ROOT.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
Exit.
EndTry.
End-of-Selection.
*=============================================================================================
*| Form GetFillUserInfo |
*| Get all user information from SAP tables and fill out Selection-Screen tables. |
*| Fill in all fields for user. |
*=============================================================================================
Form GetFillUserInfo Tables NameF Type Standard Table NameL Type Standard Table
SAPIds Type Standard Table.
Data: NameFLoc Type Range of User_Addrs-Name_First with header line,
NameLLoc Type Range of User_Addrs-Name_Last with header line,
OutlookLoc Type Range of ZXX_Hrid-ZZ_EMail_Address with header line,
SAPIdLoc Type Range of User_Addrs-BName with header line.
data: step_line like sy-stepl.
Types: Begin of UsrAddrsT.
Types: BNAME Like User_Addrs-BName,
NAME_LAST Like User_Addrs-Name_Last,
NAME_FIRST Like User_Addrs-Name_First,
NAME_TEXT Like User_Addrs-Name_Text,
DEPARTMENT Like User_Addrs-Department.
Types: End of UsrAddrsT.
Data: UsrAddrsInt type standard table of UsrAddrsT with header line.
Types: Begin of UsrAddrsT2.
Types: Value(80) Type C.
Types: End of UsrAddrsT2.
Data: UsrAddrs type standard table of UsrAddrsT2 with header line.
Data: Field_Tab type standard table of DFIES with header line.
DATA: Return_Tab Type Standard table of ddshretval with HEADER LINE.
Data: RtField Like DFIES-FIELDNAME,
WinTitle(40) Type C.
Generic F4 tables
Data: OutField_Tab Type Standard table of DFIES with header line,
OutUsrAddrs Type Standard table of UsrAddrsT2 with header line.
Data: l_prog like syst-cprog,
l_screen like syst-dynnr,
specifichlpfld like Help_Info-Dynprofld.
Data: TblSz Type I.
l_prog = syst-cprog.
l_screen = syst-dynnr.
Select D2BName D2Name_First D2NAME_LAST D2Name_Text D2~Department
From ( Usr21 as D1
Inner Join User_Addrs as D2
On D1BName = D2BName )
Appending Corresponding fields of table UsrAddrsInt
Where D2~BName <> Space.
Sort UsrAddrsInt by Name_Last Name_First BName.
Delete UsrAddrsInt Where BName cs 'n/a' or ( BName = 'Z_USER' and Name_Text cs 'USER SAMPLE' ) or BName = 'SAMPLE'.
Fill value table- one column data per row.
Loop at UsrAddrsInt.
If UsrAddrsInt-BName <> Space.
Write UsrAddrsInt-BName to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
If UsrAddrsInt-NAME_TEXT <> Space.
Write UsrAddrsInt-NAME_TEXT to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
If UsrAddrsInt-DEPARTMENT <> Space.
Write UsrAddrsInt-DEPARTMENT to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
EndLoop.
Select Distinct d1tabname D1fieldname D1Domname d1Datatype D1~position
D1rollname D1inttype D1intlen D1leng D1Decimals D1outputLen
From DD03M as D1
appending corresponding fields of table Field_tab
where
DDLanguage = Syst-Langu and
d1~tabname = 'USER_ADDRS' and
D1~fieldname in ('BNAME', 'NAME_TEXT', 'DEPARTMENT').
Sort Field_Tab by position.
Loop at Field_Tab.
Select Single DDText
Into Field_Tab-FieldText
From DD03M
Where Tabname = Field_Tab-Tabname and
FieldName = Field_Tab-fieldName and
DDLanguage = Syst-Langu.
If Syst-Subrc = 0.
Modify Field_Tab.
Endif.
EndLoop.
RtField = 'BNAME'.
WinTitle = 'Find Person(s) for SAP E-Mail'.
specifichlpfld = 'USR21-BNAME'.
Clear: OutField_Tab, OutUsrAddrs. Refresh: OutField_Tab, OutUsrAddrs.
OutField_Tab[] = Field_Tab[].
OutUsrAddrs[] = UsrAddrs[].
Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = RtField
stepL = Step_Line
dynpprog = l_prog " sy-cprog
dynpnr = l_screen " sy-dynnr
dynprofield = specifichlpfld
Value_org = 'C' "'S'
WINDOW_TITLE = WinTitle
MULTIPLE_CHOICE = 'X'
TABLES
field_Tab = OutField_Tab
value_tab = OutUsrAddrs "SelFNames
RETURN_TAB = RETURN_TAB.
If SY-SUBRC <> 0.
If Syst-Batch = ' '. " Online
Sy-MsgTy = 'I'.
Else.
Sy-MsgTy = 'E'.
Endif.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
If Syst-Batch = ' '. " Online
Raise Exception Type CX_RPTERR_EXCEPTION.
Endif.
Endif.
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
POVSTEPL = Step_Line
EXCEPTIONS
STEPL_NOT_FOUND = 1
OTHERS = 2.
If SY-SUBRC <> 0.
If Syst-Batch = ' '. " Online
Sy-MsgTy = 'I'.
Else.
Sy-MsgTy = 'E'.
Endif.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
If Syst-Batch = ' '. " Online
Raise Exception Type CX_RPTERR_EXCEPTION.
Endif.
Endif.
Loop at Return_Tab.
Clear UsrAddrsInt.
Read table UsrAddrsInt with key BName = Return_Tab-FIELDVAL.
If Syst-Subrc = 0.
NameFLoc-Low = UsrAddrsInt-Name_First. " should be ok if blank- append anyway.
NameLLoc-Low = UsrAddrsInt-Name_Last.
sapIdLoc-Low = UsrAddrsInt-BName.
Append: NameFLoc, NameLLoc, SapIdLoc.
Clear: NameFLoc, NameLLoc, SapIdLoc.
Endif.
EndLoop.
Loop at NameFLoc.
NameFLoc-High = space. NameFLoc-Sign = 'I'. NameFLoc-Option = 'EQ'. Modify NameFLoc.
EndLoop.
Loop at NameLLoc.
NameLLoc-High = space. NameLLoc-Sign = 'I'. NameLLoc-Option = 'EQ'. Modify NameLLoc.
EndLoop.
Loop at SapIdLoc.
SapIdLoc-High = space. SapIdLoc-Sign = 'I'. SapIdLoc-Option = 'EQ'. Modify SapIdLoc.
EndLoop.
Loop at NameFLoc.
Move-Corresponding NameFLoc to NameF.
Append NameF.
Add 1 to TblSz.
EndLoop.
Refresh NameFLoc. Clear: NameF, NameFLoc.
Loop at NameLLoc.
Move-Corresponding NameLLoc to NameL.
Append NameL.
EndLoop.
Refresh NameLLoc. Clear: NameL, NameLLoc.
Loop at SapIdLoc.
Move-Corresponding SapIdLoc to SAPIds.
Append SapIds.
EndLoop.
Refresh SapIdLoc. Clear: SapIds, SapIdLoc.
EndForm. " GetFillUserInfo -
Spool overflow, spool_internal_error
All SAP BASIS experts,
I am facing a spool overflow problem. When user give any print command in QAS server, it is not completed. After some time error appear spool internal error / spool overflow problem. I am also checked data in RZ20-- SAP CCMS Monitor Templates -> Spool System. Here's showing used no. 100% & this is red colour.
After that I run SE38 & run RSPO0041 & RSPO0043, but no improvement. After that I am run & checked SNRO, their has no any abnormalities.
So please suugest me for resolve this issue. Due to this issue my system log folder also filled up & user not log in GUI. Resultant i m clear the logs manually on regular base.
For ref. print scrns as follows:-Hi Johan,
Hereas no any option for attachment the dump file. So I am paste its details as below:-
Runtime Errors SPOOL_INTERNAL_ERROR
Date and Time 10.04.2015 15:11:36
Short text
Internal error in the spool system.
What happened?
Error in the SAP kernel.
The current ABAP "SAPLKKBL" program had to be terminated because the
ABAP processor detected an internal system error.
Error analysis
When calling the SAP spool system, an (unspecified) internal
error occurred.
More detailed description of error: "spool overflow "
Further information:
See below under "Spool error information".
Trigger Location of Runtime Error
Program SAPLKKBL
Include LKKBLF01
Row 439
Module type (FORM)
Module Name LIST_OUTPUT_NEW
Source Code Extract
Line
SourceCde
409
set handler gt_stack3-r_kkbl_print->handle_top_of_page
410
for gt_stack3-r_kkbl_events
411
activation space.
412
413
set handler gt_stack3-r_kkbl_print->handle_end_of_page
414
for gt_stack3-r_kkbl_events
415
activation space.
416
endif.
417
418
clear gt_stack3-r_kkbl_print.
419
420
else. "<<<Y6DK065711
421
if lflg_top_of_page = 'X' or
422
( ( gt_stack2-flg_append_mode = 'X'
423
or gt_stack-is_layout-block_mode = 'X'
424
) and
425
( not sy-subty o con_hex02 or
426
( gt_stack-is_layout-suppress_dynpro = 'X' and
427
lflg_new_page is initial ) ) ).
428
429
perform top_of_page2 using gt_stack-it_fieldcat "Y6DK065711
430
gt_stack-t_columns
431
gt_stack-is_layout
432
gt_stack-s_lprint
433
gt_stack2-s_header
434
gt_stack-listtype
435
gt_stack-i_callback_program
436
gt_stack-i_callback_top_of_page.
437
else.
438
* Provozieren des top_of_page Ereignisses
>>>>>
write space.
440
endif.
441
endif.
442
*--- Ende Top-of-page Handling
443
444
perform globals_for_output.
445
* Sichern Feldkatalog im Falle BEFORE_LINE_OUTPUT auf Zeilenbasis
446
* der Feldkatalog ver?dert wird
447
if not gt_stack2-i_callback_before_line_output is initial.
448
gt_fieldcat_sav[] = gt_stack-it_fieldcat[].
449
endif.
450
clear gflg_fc_changed.
451
452
stop_here con_bp-il2.
453
*--- Listenausgabe einfache Liste
454
if gt_stack-listtype = con_listtype-simple.
455
if gt_stack-is_layout-no_unit_splitting is initial and
456
gflg_safety is initial.
457
perform data_out_simple tables rt_outtab
458
using l_line
Regards,
Deepak -
Performance issue of this code
Hi folks,
This report is working fine.But it is taking lot of time if i enter only company code.Could any one suggest me where is the problem.
kaki
REPORT Z1F_RFKEPL00 no standard page heading
line-size 140
line-count 65
message-id Z1.
TABLES: LFA1,t005t,bsak,bseg,t001,skat.
data: begin of t_bsak occurs 0,
bukrs like bsak-bukrs, "company code
lifnr like bsak-lifnr, "Vendor acc number
augdt like bsak-augdt, "Clearing date
AUGBL like bsak-AUGBL, "Clearing Document
GJAHR like bsak-GJAHR, "year
belnr like bsak-belnr, "Document number
BUZEI like bsak-BUZEI, "Line Item
budat like bsak-budat, "Posting Date in the Document
bldat like bsak-bldat, "Document date in document
blart like bsak-blart, "Document type
BSCHL like bsak-BSCHL, "Posting key
WAERS like bsak-WAERS, "Currency key
CPUDT like bsak-cpudt, "Accounting Document Entry Date
SHKZG like bsak-shkzg, "Debit/Credit Indicator
DMBTR like bsak-dmbtr, "Amount in local currency
WRBTR like bsak-wrbtr, "Amount in document currency
SGTXT like bsak-sgtxt, "Item Text
SAKNR LIKE bsak-saknr, "G/L Account Number
hkont like bsak-hkont, "General Ledger Account
SKFBT LIKE BSAK-SKFBT, "Amount Eligible for Cash Discount
KOSTL LIKE BSEG-KOSTL, "Cost center
ktopl like t001-ktopl, "chart of accounts
txt20 like skat-txt20, "Short test for the GL acc
name1 like lfa1-name1,
land1 like lfa1-land1,
landx like t005t-landx,
end of t_bsak.
data: begin of t_header occurs 0,
bukrs like bsak-bukrs,
hkont like bsak-hkont,
lifnr like bsak-lifnr,
waers like bsak-waers,
land1 like lfa1-land1,
name1 like lfa1-name1,
landx like t005t-landx,
end of t_header.
data: begin of t_lfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
landx like t005t-landx,
end of t_lfa1.
data: t_bseg like t_bsak occurs 0 with header line.
data: t_data like t_bsak occurs 0 with header line.
selection-screen begin of block blk1 with frame title text-001.
select-options: s_lifnr for bsak-lifnr,
s_bukrs for bsak-bukrs.
selection-screen end of block blk1.
selection-screen begin of block blk2 with frame title text-002.
parameters s_budat like bsik-budat default sy-datum.
select-options: s_augdt for bsak-augdt.
selection-screen end of block blk2.
selection-screen begin of block blk3 with frame title text-003.
parameters: stand as checkbox default 'X',
park as checkbox.
selection-screen end of block blk3.
start-of-selection.
perform process_data.
top-of-page.
perform set_page_header.
*& Form process_data
text
form process_data.
data: line like t_bsak occurs 0 with header line.
data: l_wrbtr(10) type c.
data: l_debit type bsak-wrbtr,l_credit type bsak-wrbtr,
l_balance type bsak-wrbtr.
data:l_hkont(10) type n.
select BUKRS LIFNR AUGDT AUGBL GJAHR BELNR BUZEI BUDAT BLDAT
CPUDT WAERS BLART BSCHL SHKZG DMBTR WRBTR SGTXT HKONT SKFBT
from bsak
into corresponding fields of table t_bsak
where
lifnr in s_lifnr and
BUKRS in s_bukrs and
budat le s_budat and " Open items
augdt in s_augdt order by lifnr.
if sy-subrc ne 0.
message i016.
leave list-processing.
endif.
sort t_bsak by BUDAT.
CHECK NOT t_bsak[] IS INITIAL.
select MANDT BUKRS LIFNR AUGDT AUGBL GJAHR BELNR
SHKZG DMBTR WRBTR SGTXT SKFBT KOSTL BSCHL hkont BUZEI
into corresponding fields of table t_bseg from bseg
FOR ALL ENTRIES IN t_bsak
where belnr = t_bsak-belnr and
bukrs = t_bsak-bukrs and
gjahr = t_bsak-gjahr
ORDER BY PRIMARY KEY .
loop at t_bsak.
to get vendor name
select single * from lfa1 where lifnr = t_bsak-lifnr.
move lfa1-lifnr to t_header-lifnr.
move lfa1-name1 to t_header-name1.
move lfa1-land1 to t_header-land1.
move t_bsak-bukrs to t_header-bukrs.
move t_bsak-hkont to t_header-hkont.
move t_bsak-waers to t_header-waers.
if sy-subrc = 0.
append t_header.
clear t_header.
endif.
to get vendor country
loop at t_header.
select single * from t005t where land1 = t_header-land1 and
SPRAS = 'E'.
move t005t-landx to t_header-landx.
if sy-subrc = 0.
modify t_header.
clear t_header.
endif.
endloop.
loop at t_bseg where belnr = t_bsak-belnr and
bukrs = t_bsak-bukrs and
gjahr = t_bsak-gjahr.
l_hkont = t_bseg-hkont.
*To get chart of accounts
select single * from t001 where bukrs = t_bseg-bukrs.
move t001-ktopl to t_bseg-ktopl.
*To get short text for the chart of accounts
select single * from skat where ktopl = t_bseg-ktopl and
saknr = l_hkont and
spras = 'E'.
t_data-bukrs = t_bsak-bukrs.
t_data-lifnr = t_bsak-lifnr.
t_data-augdt = t_bseg-augdt.
t_data-AUGBL = t_bseg-AUGBL.
t_data-GJAHR = t_bseg-GJAHR.
t_data-belnr = t_bsak-belnr.
t_data-BUZEI = t_bseg-BUZEI.
t_data-budat = t_bsak-budat.
t_data-bldat = t_bsak-bldat.
t_data-blart = t_bsak-blart.
t_data-BSCHL = t_bseg-BSCHL.
t_data-WAERS = t_bsak-WAERS.
t_data-CPUDT = t_bsak-cpudt.
t_data-SHKZG = t_bseg-shkzg.
t_data-DMBTR = t_bseg-dmbtr.
t_data-WRBTR = t_bseg-wrbtr.
t_data-SGTXT = t_bsak-sgtxt.
t_data-SAKNR = t_bseg-saknr.
t_data-hkont = t_bseg-hkont.
t_data-SKFBT = t_bseg-SKFBT.
t_data-KOSTL = t_bseg-KOSTL.
t_data-ktopl = t_bseg-ktopl.
t_data-txt20 = skat-txt20.
append t_data.
clear t_data.
endloop.
endloop.
sort t_header by lifnr.
delete adjacent duplicates from t_header.
*Display----
*to display header
data: l_buzei type bseg-buzei.
loop at t_header.
write:/1(6) t_header-bukrs color 2,
7(8) t_header-hkont color 2,
18(10) t_header-lifnr color 2.
write:/30(10) t_header-name1.
write:/30(10) t_header-landx.
uline.
loop at t_data where lifnr = t_header-lifnr.
l_wrbtr = t_data-wrbtr.
if t_data-wrbtr = t_data-skfbt.
concatenate l_wrbtr '-' into l_wrbtr.
endif.
write:/15(11) t_data-BUDAT no-zero color 7,
26(5) t_data-BLART color 7,
30(12) t_data-belnr color 7,
42(16) t_data-BLDAT color 7,
58(5) t_data-buzei color 7,
63(12) t_data-BSCHL color 7,
75(9) t_data-AUGDT color 7,
84(35) t_data-AUGBL color 7,
119(7) t_data-WAERS color 7,
126(12) l_wrbtr color 7.
write:/55 t_data-sgtxt.
write:/60(10) t_data-kostl,
70(10) t_data-hkont,
80(20) t_data-txt20.
clear l_wrbtr.
endloop.
write:/1(6) t_data-bukrs color 2,
7(8) t_data-hkont color 2,
18(10) t_data-lifnr color 2.
uline.
line[] = t_data[].
loop at line where lifnr = t_header-lifnr.
if line-shkzg = 'H'.
l_debit = l_debit + line-wrbtr.
endif.
if line-shkzg = 'S'.
l_credit = l_credit + line-wrbtr.
endif.
endloop.
write:/1(6) t_data-bukrs color 3,
7(8) t_data-hkont color 3,
18(10) t_data-lifnr color 3.
write:/1(6) t_data-bukrs color 3,
7(11) t_data-hkont color 3,
18(102) t_data-lifnr color 3.
l_balance = l_debit - l_credit.
write:115(15) l_debit color 3. write:135(1) 'D' color 3.
write:/115(15) l_credit color 3. write:135(1) 'C' color 3.
for balnce
write:/90(25) 'Bal.:' color 3.
write:115(15) l_balance color 3.
write:120(15) l_debit color 3.
write:138(2) 'D' color 3.
write:/120(15) l_credit color 3.
write:138(2) 'C' color 3.
for balnce
write:/90(00) 'Bal.:' color 3.
write:120(15) l_balance color 3.
clear: l_debit,l_credit,l_balance.
uline.
endloop.
endform. "process_data
*& Form set_page_header
text
FORM set_page_header.
call function 'Z_REPORT_TITLE'
EXPORTING
line_size = sy-linsz
sy_title = 'List of Vendor Line Items'
uline = 'X'
first_page_only = ' '.
write :1(15) 'Allocation' color col_heading,
15(10) 'Pstng' color col_heading,
25(5) 'Do' color col_heading,
30(10) 'Documnet' color col_heading,
40(10) 'Doc' color col_heading,
50(8) 'BusA' color col_heading,
58(5) 'LIm' color col_heading,
63(4) 'PK' color col_heading,
67(4) 'S' color col_heading,
71(4) 'P' color col_heading,
75(7) 'Clrg' color col_heading,
82(10) 'Clearing' color col_heading,
92(20) 'D/c discount Amnt' color col_heading,
112(5) 'Rsn' color col_heading,
117(2) 'G' color col_heading,
119(7) 'Curr-' color col_heading,
126(12) 'Amount in' color col_heading,
138(2) 'T' color col_heading.
write space.
write :1(15) 'number' color col_heading,
15(10) 'date' color col_heading,
25(5) 'ty' color col_heading,
30(10) 'number' color col_heading,
40(18) 'date' color col_heading,
58(5) '' color col_heading,
63(4) '' color col_heading,
67(4) 'I' color col_heading,
71(4) 'K' color col_heading,
75(7) 'date' color col_heading,
82(24) 'doc.no' color col_heading,
105(20) 'in LC' color col_heading,
112(5) 'code' color col_heading,
117(2) 'L' color col_heading,
119(7) 'ency' color col_heading,
126(12) 'doc.curr.' color col_heading,
138(2) 'X' color col_heading.
write space.
uline.
ENDFORM. " set_page_headerit will better to optimize the below part of your code -
loop at t_bsak.
to get vendor name
select single * from lfa1 where lifnr = t_bsak-lifnr.
move lfa1-lifnr to t_header-lifnr.
move lfa1-name1 to t_header-name1.
move lfa1-land1 to t_header-land1.
move t_bsak-bukrs to t_header-bukrs.
move t_bsak-hkont to t_header-hkont.
move t_bsak-waers to t_header-waers.
if sy-subrc = 0.
append t_header.
clear t_header.
endif.
to get vendor country
loop at t_header.
select single * from t005t where land1 = t_header-land1 and
SPRAS = 'E'.
move t005t-landx to t_header-landx.
if sy-subrc = 0.
modify t_header.
clear t_header.
endif.
endloop.
loop at t_bseg where belnr = t_bsak-belnr and
bukrs = t_bsak-bukrs and
gjahr = t_bsak-gjahr.
l_hkont = t_bseg-hkont.
*To get chart of accounts
select single * from t001 where bukrs = t_bseg-bukrs.
move t001-ktopl to t_bseg-ktopl.
*To get short text for the chart of accounts
select single * from skat where ktopl = t_bseg-ktopl and
saknr = l_hkont and
spras = 'E'.
t_data-bukrs = t_bsak-bukrs.
t_data-lifnr = t_bsak-lifnr.
t_data-augdt = t_bseg-augdt.
t_data-AUGBL = t_bseg-AUGBL.
t_data-GJAHR = t_bseg-GJAHR.
t_data-belnr = t_bsak-belnr.
t_data-BUZEI = t_bseg-BUZEI.
t_data-budat = t_bsak-budat.
t_data-bldat = t_bsak-bldat.
t_data-blart = t_bsak-blart.
t_data-BSCHL = t_bseg-BSCHL.
t_data-WAERS = t_bsak-WAERS.
t_data-CPUDT = t_bsak-cpudt.
t_data-SHKZG = t_bseg-shkzg.
t_data-DMBTR = t_bseg-dmbtr.
t_data-WRBTR = t_bseg-wrbtr.
t_data-SGTXT = t_bsak-sgtxt.
t_data-SAKNR = t_bseg-saknr.
t_data-hkont = t_bseg-hkont.
t_data-SKFBT = t_bseg-SKFBT.
t_data-KOSTL = t_bseg-KOSTL.
t_data-ktopl = t_bseg-ktopl.
t_data-txt20 = skat-txt20.
append t_data.
clear t_data.
endloop.
endloop.
You are selecting data from database inside the loop and specially you are populating t_header inside the loop and again looping on the same table to get value of t005t-landx. Here you are updating even those records which are already update by initial loop pass so multiple updation for already updated records.
Thanks,
Rajeev -
Hi frnds,
i have modified a standard report to 'z' report.the output comes as like
standard abap list. when i execute the report in foreground and saves the output
in spreadsheet its fine but when i execute it in background the output is messed up.(excel)
the background needs to be executed in sm37 and spool request is created then we
can see the file type and its output.(sp01).
a standard program is attached in that report-RSBTCHH0 from where its takes
the output in excel.
Hoe to mail funcitionality to this report
help me where to make the changes..
REPORT ZFCHKN00
LINE-COUNT (1)
LINE-SIZE 171
NO STANDARD PAGE HEADING
MESSAGE-ID FS.
TABLES:
AUTHA,
BHDGD, "Batch-Heading
BNKA, "Bankdaten
BKPF, "Accounting document header
PAYR, "Scheckdatei
RFSDO, "Select-Options
T001, "für das Land des Buchungskreises
T005, "für den Bankschlüsseltyp im Land
T012, "Banken
T012K, "Bankenkonten
T042Z, "Name des Zahlweges
TCURX, "Nachkommastellen
TVOIT, "Grund ungültiger Scheck, Text
BSAK, "Accounting: Secondary index for vendors (cleared items)
BSEG, "Accounting document segment
REGUH. "Payment data from payment progra
RANGES:
SEL_LAUD FOR PAYR-LAUFD,
SEL_LAUI FOR PAYR-LAUFI,
SEL_XDAT FOR PAYR-EXTRD,
SEL_XTIM FOR PAYR-EXTRT,
SEL_ECHT FOR PAYR-VOIDR,
TAB_RZAWE FOR PAYR-RZAWE.
INCLUDE RFEPOSC1. "Tabelle POSTAB für Rechnungsinfo
DATA:
FLG_INTENSIV(1) TYPE N, "1 - Color intensiv (Streifen)
FLG_POSTEN(1) TYPE N, "1 - Rechnungsposten selektiert
FLG_SUMME(1) TYPE N, "1 - Summe der EPs möglich
HLP_DATUM(10) TYPE C, "aufbereitetes Datum
HLP_VON/BIS(27) TYPE C, "von Nummer bis Nummer
HLP_SUBRC LIKE SY-SUBRC, "Returncode
HLP_WAERS LIKE POSTAB-WAERS, "Währung der EPs
SUM_WRSHB LIKE POSTAB-WRSHB,
SUM_ABZUG LIKE POSTAB-WSKTO, "Summen für die Rechnungssumme
SUM_NETTO LIKE POSTAB-WRSHB,
TXT_ZEILE(132) TYPE C, "Textzeile SYALLA asr 11456
TXT_ZEILE(171) TYPE C, "Textzeile SYALLA asr 11456
BEGIN OF TAB_SUMME OCCURS 10, "pro Zahlweg Summe je Währung
WAERS LIKE PAYR-WAERS,
RWBTR LIKE PAYR-RWBTR,
Inserted By Jassi on 04/14/04 - ASR# 23240
DISER LIKE PAYR-RWBTR, "Discount Earned Total
DISTA LIKE PAYR-RWBTR, "Discount Taken Total
DISLO LIKE PAYR-RWBTR, "Discount Lost Total
END OF TAB_SUMME,
BEGIN OF TAB_LAUFK OCCURS 1.
INCLUDE STRUCTURE ILAUFK.
DATA: END OF TAB_LAUFK,
BEGIN OF MIKLINE, "Feldleiste zur Aufnahem des
ZBUKR LIKE PAYR-ZBUKR, "variablen Teils der Mikro-Fiche-
HBKID LIKE PAYR-HBKID, "Zeile
HKTID LIKE PAYR-HKTID,
RZAWE LIKE PAYR-RZAWE,
CHECF LIKE PAYR-CHECF,
END OF MIKLINE.
DATA: FLAG TYPE C VALUE '0'.
DATA: DISAM TYPE P DECIMALS 5,
DAYS_1 TYPE I,
DAYS_2 TYPE I,
PERC_1 TYPE P DECIMALS 3,
PERC_2 TYPE P DECIMALS 3,
DAYS_PAID TYPE I,
DISER TYPE P DECIMALS 5,
DISTA TYPE P DECIMALS 2,
DISTOT(17),
DISLO TYPE P DECIMALS 2.
ASR # 8269 RKSHARMA----
DATA: BVORG1 LIKE BKPF-BVORG,
BVORG2 LIKE BKPF-BVORG,
BUKRS1 LIKE BKPF-BUKRS,
BUKRS2 LIKE BKPF-BUKRS,
BELNR1 LIKE BKPF-BELNR,
BELNR2 LIKE BKPF-BELNR,
BELNR3 LIKE BKPF-BELNR,
HKONT1 LIKE BSEG-HKONT,
SHKZG1 LIKE BSEG-SHKZG,
DMBTR1 LIKE BSEG-DMBTR.
FIELD-GROUPS:
HEADER,
ZAHLUNG, "means Payment
RECHNUNG. "means Calculation
INSERT
PAYR-HBKID
PAYR-HKTID
PAYR-XMANU
PAYR-RZAWE
PAYR-CHECT
POSTAB-BUKRS
POSTAB-GJAHR
POSTAB-BELNR
INTO HEADER.
INSERT
PAYR
INTO ZAHLUNG.
INSERT
POSTAB
INTO RECHNUNG.
Selektionsparameter *
INCLUDE: RFCHKI99, RFDBRMAC.
PARAMETERS: "Zahlender Buchungskreis
PAR_ZBUK LIKE PAYR-ZBUKR MEMORY ID BUK.
SELECT-OPTIONS:
SEL_HBKI FOR PAYR-HBKID, "Hausbank (Kurzschlüssel)
SEL_HKTI FOR PAYR-HKTID. "Kontenverbindung (Kurzschlüssel)
PARAMETERS: "Personalabrechnungsschecks
PAR_XPER LIKE RFPDO2-CHKNXPER MEMORY ID XHR.
SELECTION-SCREEN SKIP.
BEGIN_OF_BLOCK 0.
SELECT-OPTIONS:
SEL_BNKL FOR T012-BANKL NO-EXTENSION,"Bankleitzahl
SEL_BNKN FOR T012K-BANKN NO-EXTENSION."Bankkonto
SELECT_OPTION_SCHECK.
SELECT-OPTIONS:
SEL_WAER FOR PAYR-WAERS, "Währungsschlüssel
SEL_RWBT FOR PAYR-RWBTR. "Betrag
END_OF_BLOCK 0.
BEGIN_OF_BLOCK 1.
SELECT-OPTIONS:
SEL_ZALD FOR RFSDO-CHKLADAT, "Ausstellungsdatum
SEL_CPUD FOR RFSDO-CHKLEDAT, "Erstellungsdatum
S_BUDAT FOR BKPF-BUDAT,
SEL_BNCD FOR PAYR-BANCD, "Einlösedatum
SEL_USER FOR RFSDO-CHKLUSER, "Scheckaussteller
SEL_VBLN FOR PAYR-VBLNR, "Zahlungsbelegnummer
SEL_PERN FOR PAYR-PERNR, "Personalnummer
SEL_VOID FOR PAYR-VOIDR. "Ungültigkeitsgrund
SELECTION-SCREEN:
BEGIN OF LINE,
COMMENT 01(31) TEXT-015 FOR FIELD ZW_LAUFD.
PARAMETERS:
ZW_LAUFD LIKE PAYR-LAUFD, "Laufdatum
ZW_LAUFI LIKE PAYR-LAUFI, "Laufidentifikation
ZW_XVORL LIKE REGUH-XVORL NO-DISPLAY."Vorschlagslauf
SELECTION-SCREEN:
END OF LINE,
BEGIN OF LINE,
COMMENT 01(31) TEXT-016 FOR FIELD PAR_XDAT.
PARAMETERS:
PAR_XDAT LIKE PAYR-EXTRD, "Extraktdatum
PAR_XTIM LIKE PAYR-EXTRT. "Extraktuhrzeit
SELECTION-SCREEN END OF LINE.
END_OF_BLOCK 1.
BEGIN_OF_BLOCK 2.
PARAMETERS:
PAR_XAUS LIKE RFPDO1-CHKNXAUS, "Scheckaußenstandsliste
PAR_EPOS LIKE RFPDO-CHKNEPOS, "Gezahlte Posten
PAR_LSEP LIKE RFPDO-ALLGLSEP, "Listseparation
PAR_MIKF LIKE RFPDO-ALLGMIKF, "Mikro-Fiche-Information
PAR_LINE LIKE RFPDO1-ALLGLINE. "Zusatzüberschrift
END_OF_BLOCK 2.
Buchungskreis vorbelegen *
INITIALIZATION.
GET_FRAME_TITLE: 0,1,2.
GET_TEXT: 0,1.
IF PAR_XTIM IS INITIAL.
SHIFT PAR_XTIM BY 6 PLACES.
ENDIF.
REFRESH TAB_LAUFK.
TAB_LAUFK-LAUFK = 'W'.
TAB_LAUFK-SIGN = 'E'.
APPEND TAB_LAUFK.
F4 für den Zahllauf *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ZW_LAUFD.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F2NME = 'ZW_LAUFI'
IMPORTING
LAUFD = ZW_LAUFD
LAUFI = ZW_LAUFI
TABLES
LAUFK = TAB_LAUFK.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ZW_LAUFI.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'I'
F2NME = 'ZW_LAUFD'
IMPORTING
LAUFD = ZW_LAUFD
LAUFI = ZW_LAUFI
TABLES
LAUFK = TAB_LAUFK.
Prüfung der Eingaben (AT SELECTION-SCREEN) *
INCLUDE RFCHKI00.
IF PAR_XTIM IS INITIAL.
SHIFT PAR_XTIM BY 6 PLACES.
ENDIF.
Seitentitel (Bankinformation und Überschrift) *
TOP-OF-PAGE.
FORMAT RESET.
MOVE MIKLINE TO BHDGD-GRPIN.
PERFORM BATCH-HEADING(RSBTCHH0).
ULINE.
SKIP.
TXT_ZEILE = TEXT-007.
REPLACE:
'&HBKID' WITH PAYR-HBKID INTO TXT_ZEILE,
'&BANKA' WITH BNKA-BANKA INTO TXT_ZEILE,
'&ORT01' WITH BNKA-ORT01 INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
TXT_ZEILE = TEXT-008.
REPLACE:
'&BANKL' WITH T012-BANKL INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
TXT_ZEILE = TEXT-009.
REPLACE:
'&HKTID' WITH PAYR-HKTID INTO TXT_ZEILE,
'&BANKN' WITH T012K-BANKN INTO TXT_ZEILE.
WRITE:
/ TXT_ZEILE(16) COLOR 1 INVERSE,
TXT_ZEILE+16(115).
SKIP.
ULINE.
FORMAT COLOR 1 INTENSIFIED OFF.
WRITE: / SY-VLINE NO-GAP,
T042Z-TEXT1,
132 SY-VLINE. "syalla asr 11456
171 SY-VLINE. "syalla asr 11456
FORMAT RESET.
ULINE.
TXT_ZEILE = TEXT-005.
IF PAR_XPER NE SPACE.
TXT_ZEILE+15(10) = TEXT-017.
ENDIF.
IF PAR_XAUS NE SPACE.
IF TXT_ZEILE CA '/'.
WRITE:
SPACE TO TXT_ZEILE+SY-FDPOS,
SY-VLINE TO TXT_ZEILE+169.
ENDIF.
ENDIF.
IF PAR_EPOS EQ SPACE.
WRITE:
/ TXT_ZEILE COLOR 1 INTENSIFIED,
132 'Disc earned' COLOR 1 INTENSIFIED, "syalla asr 11456
149 'Disc taken'COLOR 1 INTENSIFIED, "syalla asr 11456
161 'Disc lost'COLOR 1 INTENSIFIED, "syalla asr 11456
171 SY-VLINE . "syalla asr 11456
ELSE.
WRITE:
/ TXT_ZEILE COLOR 7 INTENSIFIED,
/ TEXT-006 COLOR 1 INTENSIFIED,
171 SY-VLINE . "syalla asr 11456
SUMMARY.
ENDIF.
ULINE.
Seitenende *
END-OF-PAGE.
ULINE.
Schecks selektieren *
START-OF-SELECTION.
Keine Verarbeitung von Vorschlagsläufen
IF ZW_XVORL NE SPACE.
MESSAGE S615 WITH SY-REPID.
STOP.
ENDIF.
Keine FI-Selektion bei HR und umgekehrt
CLEAR SEL_LAUI.
SEL_LAUI-LOW = '+++++P'.
SEL_LAUI-OPTION = 'CP'.
IF PAR_XPER EQ SPACE.
SEL_LAUI-SIGN = 'E'.
REFRESH SEL_PERN.
ELSE.
SEL_LAUI-SIGN = 'I'.
REFRESH SEL_VBLN.
CLEAR SEL_VBLN.
SEL_VBLN-OPTION = 'EQ'.
SEL_VBLN-SIGN = 'I'.
APPEND SEL_VBLN.
CLEAR PAR_EPOS.
ENDIF.
IF ZW_LAUFI IS INITIAL.
APPEND SEL_LAUI.
ENDIF.
Übergabe der Zahllauf- und Extraktparameter als Select-Option
IF NOT ( ZW_LAUFD IS INITIAL ).
CLEAR SEL_LAUD.
SEL_LAUD-LOW = ZW_LAUFD.
SEL_LAUD-OPTION = 'EQ'.
SEL_LAUD-SIGN = 'I'.
APPEND SEL_LAUD.
ENDIF.
IF NOT ( ZW_LAUFI IS INITIAL ).
CLEAR SEL_LAUI.
SEL_LAUI-LOW = ZW_LAUFI.
SEL_LAUI-OPTION = 'EQ'.
SEL_LAUI-SIGN = 'I'.
APPEND SEL_LAUI.
ENDIF.
IF NOT ( PAR_XDAT IS INITIAL ).
CLEAR SEL_XDAT.
SEL_XDAT-LOW = PAR_XDAT.
SEL_XDAT-OPTION = 'EQ'.
SEL_XDAT-SIGN = 'I'.
APPEND SEL_XDAT.
ENDIF.
IF PAR_XTIM NE SPACE.
CLEAR SEL_XTIM.
SEL_XTIM-LOW = PAR_XTIM.
SEL_XTIM-OPTION = 'EQ'.
SEL_XTIM-SIGN = 'I'.
APPEND SEL_XTIM.
ENDIF.
Nur gültige Schecks selektieren, wenn Währung gewünscht
IF NOT ( SEL_WAER IS INITIAL ).
CLEAR SEL_ECHT.
SEL_ECHT-OPTION = 'EQ'.
SEL_ECHT-SIGN = 'I'.
APPEND SEL_ECHT.
ENDIF.
Zusatztitel füllen
IF PAR_LINE EQ SPACE.
PAR_LINE = TEXT-014.
REPLACE '&BUKRS' WITH PAR_ZBUK INTO PAR_LINE.
ENDIF.
Abweichender Titel für die Scheckaußenstandsliste
IF PAR_XAUS NE SPACE.
SY-TITLE = TEXT-013.
ENDIF.
Batch-Heading und Mikro-Fiche-Zeile vorbereiten
BHDGD-INIFL = 0.
BHDGD-LINES = SY-LINSZ.
BHDGD-UNAME = SY-UNAME.
BHDGD-REPID = SY-REPID.
BHDGD-LINE1 = SY-TITLE.
BHDGD-LINE2 = PAR_LINE.
BHDGD-MIFFL = PAR_MIKF.
BHDGD-SEPAR = PAR_LSEP.
BHDGD-DOMAI = 'BUKRS'.
BHDGD-BUKRS = PAR_ZBUK.
BHDGD-WERTE = PAR_ZBUK.
MIKLINE-ZBUKR = PAR_ZBUK.
PERFORM NEW-SECTION(RSBTCHH0).
Alle möglichen Zahlwege ermitteln, die Schecks produzieren, und
besondere Behandlung der Schecknummer-Parameter/Betrags-Select-Option
INCLUDE RFCHKI10.
SELECT SINGLE * FROM T005 WHERE LAND1 EQ T001-LAND1.
Selektion der Daten
SELECT * FROM PAYR
WHERE ZBUKR EQ PAR_ZBUK
AND HBKID IN SEL_HBKI
AND HKTID IN SEL_HKTI
AND RZAWE IN TAB_RZAWE
AND CHECF LE PAR_CHKT
AND CHECT GE PAR_CHKF
AND LAUFD IN SEL_LAUD
AND LAUFI IN SEL_LAUI
AND VBLNR IN SEL_VBLN
AND ZALDT IN SEL_ZALD
AND WAERS IN SEL_WAER
AND RWBTR IN SEL_RWBT
AND BANCD IN SEL_BNCD
AND EXTRD IN SEL_XDAT
AND EXTRT IN SEL_XTIM
AND ( PRIDT IN SEL_CPUD
OR VOIDD IN SEL_CPUD )
AND ( PRIUS IN SEL_USER
OR VOIDU IN SEL_USER )
AND VOIDR IN SEL_VOID
AND VOIDR IN SEL_ECHT.
CHECK PAYR-PERNR IN SEL_PERN.
IF PAR_XAUS NE SPACE. "nur nicht eingelöste Schecks
CHECK PAYR-XBANC EQ SPACE AND PAYR-VOIDR EQ SPACE.
ENDIF.
Modification carried out by VChavva on 3/5/01
Check posting date of the document on the selection screen.
IF NOT S_BUDAT IS INITIAL.
SELECT SINGLE BUDAT FROM BKPF INTO BKPF-BUDAT
WHERE BUKRS EQ PAYR-ZBUKR AND
BELNR EQ PAYR-VBLNR AND
GJAHR EQ PAYR-GJAHR AND
BUDAT IN S_BUDAT.
CHECK SY-SUBRC EQ 0.
ENDIF.
End modification
CLEAR POSTAB.
IF PAYR-XMANU NE SPACE.
PAYR-RZAWE = SPACE.
ENDIF.
EXTRACT ZAHLUNG.
IF PAR_EPOS NE SPACE AND PAYR-VOIDR EQ SPACE.
REFRESH: POSTAB.
CALL FUNCTION 'GET_INVOICE_DOCUMENT_NUMBERS'
EXPORTING
I_XBUKR = PAYR-XBUKR
I_ZBUKR = PAYR-ZBUKR
I_VBLNR = PAYR-VBLNR
I_GJAHR = PAYR-GJAHR
TABLES
T_INVOICE = POSTAB.
LOOP AT POSTAB.
IF POSTAB-XHELL EQ SPACE.
EXTRACT RECHNUNG.
ENDIF.
ENDLOOP.
ENDIF.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE S509.
ENDIF.
SORT.
LOOP.
PERFORM GET_DATA_FOR_DISCOUNT_EARNED. "syalla asr 11456
PERFORM GET_DATA_FOR_DISCOUNT_TAKEN. "syalla asr 11456
PERFORM GET_DATA_FOR_DISCOUNT_LOST. "syalla 11456
AT NEW PAYR-HKTID.
PERFORM WRITE_BANK.
ENDAT.
AT NEW PAYR-RZAWE.
PERFORM WRITE_ZAHLWEG.
ENDAT.
AT ZAHLUNG.
PERFORM WRITE_ZAHLUNG.
ENDAT.
AT RECHNUNG.
PERFORM WRITE_RECHNUNG.
ENDAT.
AT END OF PAYR-CHECT.
PERFORM WRITE_RECHNUNGSSUMME.
ENDAT.
AT END OF PAYR-RZAWE.
PERFORM WRITE_ZAHLWEGSUMME.
ENDAT.
ENDLOOP.
IF SY-BATCH NE SPACE.
MESSAGE S620.
ENDIF.
FORM WRITE_BANK *
Bereitstellen der Zeilen mit den Bankinformationen für den Titel *
FORM WRITE_BANK.
MIKLINE-HBKID = PAYR-HBKID.
MIKLINE-HKTID = PAYR-HKTID.
SELECT SINGLE * FROM T012
WHERE BUKRS EQ PAYR-ZBUKR
AND HBKID EQ PAYR-HBKID.
SELECT SINGLE * FROM T012K
WHERE BUKRS EQ PAYR-ZBUKR
AND HBKID EQ PAYR-HBKID
AND HKTID EQ PAYR-HKTID.
IF T005-BNKEY EQ '2'.
T012-BANKL = T012K-BANKN.
ENDIF.
SELECT SINGLE * FROM BNKA
WHERE BANKS EQ T012-BANKS
AND BANKL EQ T012-BANKL.
ENDFORM.
FORM WRITE_ZAHLWEG *
Bereitstellen einer Zeile mit dem Namen des Zahlwegs für den Titel *
FORM WRITE_ZAHLWEG.
MIKLINE-RZAWE = PAYR-RZAWE.
MIKLINE-CHECF = PAYR-CHECF.
IF PAYR-RZAWE NE SPACE.
SELECT SINGLE * FROM T042Z
WHERE LAND1 EQ T001-LAND1
AND ZLSCH EQ PAYR-RZAWE.
ELSEIF PAYR-XMANU EQ SPACE.
T042Z-TEXT1 = TEXT-010.
ELSE.
T042Z-TEXT1 = TEXT-011.
ENDIF.
NEW-PAGE.
FLG_INTENSIV = 1.
REFRESH TAB_SUMME.
ENDFORM.
FORM WRITE_ZAHLUNG *
Ausgabe einer Zeile mit Scheckinformationen *
FORM WRITE_ZAHLUNG.
IF PAR_EPOS NE SPACE. "Item Paid
FORMAT COLOR 7 INTENSIFIED OFF.
ELSE.
IF FLG_INTENSIV = 0.
FLG_INTENSIV = 1.
FORMAT COLOR 2 INTENSIFIED OFF.
ELSE.
FLG_INTENSIV = 0.
FORMAT COLOR 2 INTENSIFIED.
ENDIF.
ENDIF.
WRITE / SY-VLINE NO-GAP.
IF PAR_XPER NE SPACE AND PAYR-PERNR NE 0.
PAYR-VBLNR = PAYR-PERNR.
ENDIF.
IF PAYR-VOIDR EQ SPACE.
WRITE: PAYR-CHECT,
PAYR-VBLNR,
PAYR-ZALDT DD/MM/YYYY,
PAYR-WAERS,
(14) PAYR-RWBTR CURRENCY PAYR-WAERS NO-SIGN,
60(30) PAYR-ZNME1.
CLEAR TXT_ZEILE.
TXT_ZEILE = PAYR-ZORT1.
TXT_ZEILE+36 = PAYR-ZREGI.
CONDENSE TXT_ZEILE.
IF PAR_XAUS NE SPACE OR PAYR-XBANC EQ SPACE.
WRITE:
(38) TXT_ZEILE.
ELSE.
WRITE:
(30) TXT_ZEILE.
ENDIF.
IF PAYR-XBANC NE SPACE.
WRITE:
117 PAYR-BANCD DD/MM/YYYY. "SYALLA ASR 11456
122 payr-bancd dd/mm/yyyy. "SYALLA ASR 11456
ENDIF.
IF PAR_EPOS EQ SPACE. "Items paid
ASR 4176 BY RAJU
DISER = DISTA + DISLO.
ASR 4176 BY RAJU
WRITE: 128 DISER DECIMALS 2. "SYALLA asr 11456
WRITE: 144 DISTA DECIMALS 2. "SYALLA asr 11456
WRITE: 160 DISLO DECIMALS 2. "SYALLA asr 11456
CLEAR: diser,dista,dislo,distot. "JASSI
ENDIF.
ELSE.
IF PAYR-CHECF EQ PAYR-CHECT.
WRITE PAYR-CHECT.
IF PAYR-VBLNR NE SPACE.
WRITE: PAYR-VBLNR,
PAYR-ZALDT DD/MM/YYYY.
ENDIF.
ELSE.
WRITE:
PAYR-CHECF TO HLP_VON/BIS,
'-' TO HLP_VON/BIS+13,
PAYR-CHECT TO HLP_VON/BIS+14.
CONDENSE HLP_VON/BIS NO-GAPS.
WRITE HLP_VON/BIS.
ENDIF.
TXT_ZEILE = TEXT-004. "entwertet durch ... am ...
SELECT SINGLE * FROM TVOIT
WHERE LANGU EQ SY-LANGU
AND VOIDR EQ PAYR-VOIDR.
WRITE PAYR-VOIDD TO HLP_DATUM DD/MM/YYYY.
REPLACE:
'&VOIDU' WITH PAYR-VOIDU INTO TXT_ZEILE,
'&VOIDD' WITH HLP_DATUM INTO TXT_ZEILE,
'&VOIDT' WITH TVOIT-VOIDT INTO TXT_ZEILE.
CONDENSE TXT_ZEILE.
WRITE:
60 TXT_ZEILE.
ENDIF.
WRITE 132 SY-VLINE. " syalla asr 11456
WRITE 171 SY-VLINE. " syalla asr 11456
IF PAYR-VOIDR EQ SPACE.
TAB_SUMME-WAERS = PAYR-WAERS.
TAB_SUMME-RWBTR = ABS( PAYR-RWBTR ).
Inserted By Jassi on 04/14/04 - ASR# 23240
TAB_SUMME-DISER = DISER. "Discount Earned Total
TAB_SUMME-DISTA = DISTA. "Discount Taken Total
TAB_SUMME-DISLO = DISLO. "Discount Lost Total
End of Insertion on 04/14/04 - ASR# 23240
COLLECT TAB_SUMME.
CLEAR: DISER,DISTA,DISLO,DISTOT. "JASSI
ENDIF.
SUM_WRSHB = 0.
SUM_ABZUG = 0.
SUM_NETTO = 0.
FLG_POSTEN = 0.
FLG_SUMME = 1.
HLP_WAERS = SPACE.
ENDFORM.
FORM WRITE_RECHNUNG *
Ausgabe einer Zeile mit Rechnungsinformationen *
FORM WRITE_RECHNUNG.
DATA:
ABZUG LIKE POSTAB-WSKTO,
NETTO LIKE POSTAB-WRSHB.
FORMAT COLOR 2 INTENSIFIED OFF.
IF FLG_POSTEN EQ 0.
WRITE:
/ SY-VLINE,
SPACE,
TEXT-003, "Gezahlte Posten:
WRITE 132 SY-VLINE. " syalla asr 11456
171 SY-VLINE. " syalla asr 11456
ENDIF.
POSTAB-WRSHB = - POSTAB-WRSHB.
ABZUG = POSTAB-WSKTO + POSTAB-QBSHB.
NETTO = POSTAB-WRSHB + ABZUG.
WRITE:
/ SY-VLINE,
SPACE,
POSTAB-BUKRS,
POSTAB-GSBER,
POSTAB-XBLNR,
POSTAB-BELNR,
POSTAB-BUZEI,
POSTAB-BLDAT DD/MM/YYYY,
POSTAB-BUDAT DD/MM/YYYY,
POSTAB-WAERS,
(17) POSTAB-WRSHB CURRENCY POSTAB-WAERS,
(17) ABZUG CURRENCY POSTAB-WAERS,
(17) NETTO CURRENCY POSTAB-WAERS,
132 SY-VLINE. " syalla asr 11456
171 SY-VLINE. " syalla asr 11456
SUM_WRSHB = SUM_WRSHB + POSTAB-WRSHB.
SUM_ABZUG = SUM_ABZUG + ABZUG.
SUM_NETTO = SUM_NETTO + NETTO.
FLG_POSTEN = 1.
IF HLP_WAERS EQ SPACE.
HLP_WAERS = POSTAB-WAERS.
ELSEIF HLP_WAERS NE POSTAB-WAERS.
FLG_SUMME = 0.
ENDIF.
ENDFORM.
FORM WRITE_RECHNUNGSUMME *
Ausgabe der Summen der Rechnungsinformationen *
FORM WRITE_RECHNUNGSSUMME.
CHECK PAR_EPOS NE SPACE.
IF FLG_POSTEN EQ 1 AND FLG_SUMME EQ 1.
FORMAT COLOR 3 INTENSIFIED OFF.
WRITE:
/ SY-VLINE,
58 TEXT-012,
69 HLP_WAERS,
(17) SUM_WRSHB CURRENCY PAYR-WAERS,
(17) SUM_ABZUG CURRENCY PAYR-WAERS,
(17) SUM_NETTO CURRENCY PAYR-WAERS,
132 SY-VLINE. "syalla asr 11456
171 SY-VLINE. "syalla asr 11456
ENDIF.
ULINE.
ENDFORM.
FORM WRITE_ZAHLWEGSUMME *
Ausgabe der Summen je Währung für diesen Zahlweg *
FORM WRITE_ZAHLWEGSUMME.
FORMAT COLOR 3 INTENSIFIED.
DESCRIBE TABLE TAB_SUMME LINES SY-TFILL.
ADD 2 TO SY-TFILL.
RESERVE SY-TFILL LINES.
SORT TAB_SUMME.
LOOP AT TAB_SUMME.
AT FIRST.
IF PAR_EPOS EQ SPACE.
ULINE.
ENDIF.
WRITE:
/2 TEXT-012,
13 SPACE.
ENDAT.
WRITE:
1(1) SY-VLINE,
38 TAB_SUMME-WAERS,
(14) TAB_SUMME-RWBTR CURRENCY TAB_SUMME-WAERS NO-SIGN.
132 SY-VLINE. "syalla asr 11456
Inserted By Jassi on 04/14/04 - ASR# 23240
Write Totals
WRITE:127 TAB_SUMME-DISER DECIMALS 2. "JASSI
WRITE:144 TAB_SUMME-DISTA DECIMALS 2. "JASSI
WRITE:161 TAB_SUMME-DISLO DECIMALS 2, "JASSI
End of Insertion on 04/14/04 - ASR# 23240
171 SY-VLINE. "syalla asr 11456
NEW-LINE.
ENDLOOP.
IF SY-SUBRC EQ 0 OR PAR_EPOS EQ SPACE.
ULINE.
ENDIF.
ENDFORM.
*& Form GET_DATA_FOR_DISCOUNT_EARNED
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_EARNED.
SELECT * FROM BSAK WHERE AUGBL = PAYR-VBLNR AND BUKRS = PAYR-ZBUKR.
IF BSAK-BELNR <> BSAK-AUGBL.
IF BSAK-ZBD1P <> '0.000' OR BSAK-ZBD2P <> '0.000'.
IF BSAK-ZBD1T <> 0 AND BSAK-ZBD2T = 0.
DAYS_1 = BSAK-ZBD1T.
PERC_1 = BSAK-ZBD1P.
ENDIF.
IF BSAK-ZBD2T <> 0 AND BSAK-ZBD1T = 0.
DAYS_1 = BSAK-ZBD2T.
PERC_1 = BSAK-ZBD2P.
ENDIF.
IF BSAK-ZBD1T <> 0 AND BSAK-ZBD1T < BSAK-ZBD2T .
DAYS_1 = BSAK-ZBD1T.
PERC_1 = BSAK-ZBD1P.
DAYS_2 = BSAK-ZBD2T.
PERC_2 = BSAK-ZBD2P.
ENDIF.
IF BSAK-ZBD2T <> 0 AND BSAK-ZBD2T < BSAK-ZBD1T .
DAYS_1 = BSAK-ZBD2T.
PERC_1 = BSAK-ZBD2P.
DAYS_2 = BSAK-ZBD1T.
PERC_2 = BSAK-ZBD1P.
ENDIF.
DAYS_PAID = BSAK-AUGDT - BSAK-ZFBDT.
IF DAYS_PAID <= DAYS_1.
DISAM = ( BSAK-DMBTR * PERC_1 ) / 100 .
ELSEIF DAYS_PAID <= DAYS_2.
DISAM = ( BSAK-DMBTR * PERC_2 ) / 100 .
ENDIF.
DISER = DISER + DISAM.
CLEAR DISAM.
ENDIF.
ENDIF.
CLEAR: DISAM,PERC_2,PERC_1,DAYS_1,DAYS_2,DAYS_PAID,BSAK.
ENDSELECT.
ENDFORM. " GET_DATA_FOR_DISCOUNT_EARNED
*& Form GET_DATA_FOR_DISCOUNT_TAKEN
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_TAKEN.
CLEAR DISTA.
SELECT * FROM BSEG WHERE BUKRS = PAYR-ZBUKR AND BELNR = PAYR-VBLNR.
IF BSEG-HKONT = '0000820000'.
IF BSEG-SHKZG = 'S'.
BSEG-DMBTR = -1 * BSEG-DMBTR.
ENDIF.
DISTA = DISTA + BSEG-DMBTR.
Start Of ASR # 8269 RKSHARMA----
ELSE.
SELECT SINGLE BVORG FROM BKPF INTO BVORG1
WHERE BUKRS = PAYR-ZBUKR AND BELNR = PAYR-VBLNR.
IF BVORG1 <> SPACE.
SELECT BUKRS BELNR FROM BKPF INTO (BUKRS1, BELNR1)
WHERE BVORG = BVORG1.
IF BELNR1 <> PAYR-VBLNR AND BUKRS1 <> PAYR-ZBUKR.
BUKRS2 = BUKRS1.
BELNR2 = BELNR1.
ENDIF.
ENDSELECT.
IF BUKRS2 <> SPACE AND BELNR2 <> SPACE.
SELECT BELNR FROM BSEG INTO BELNR1
WHERE AUGBL = BELNR2
AND BUKRS = BUKRS2.
IF BELNR1 <> BELNR2.
BELNR3 = BELNR1.
ENDIF.
ENDSELECT.
ENDIF.
CLEAR DISTA.
CLEAR DMBTR1.
IF BELNR3 <> SPACE.
SELECT DMBTR HKONT SHKZG FROM BSEG INTO (DMBTR1, HKONT1, SHKZG1)
WHERE BELNR = BELNR3
AND BUKRS = BUKRS2.
IF HKONT1 = '0000820000'.
FLAG = 1.
IF SHKZG1 = 'S'.
DMBTR1 = -1 * DMBTR1.
ENDIF.
IF DMBTR1 <> 0.
DISTA = DISTA + DMBTR1.
ELSE.
DISTA = 0.
ENDIF.
ENDIF.
CLEAR DMBTR1.
ENDSELECT.
ENDIF.
IF FLAG = 0.
*else. "new line
IF BELNR2 <> SPACE.
SELECT DMBTR HKONT SHKZG FROM BSEG INTO (DMBTR1, HKONT1, SHKZG1)
WHERE BELNR = BELNR2
AND BUKRS = BUKRS2.
IF HKONT1 = '0000820000'.
IF SHKZG1 = 'S'.
DMBTR1 = -1 * DMBTR1.
ENDIF.
IF DMBTR1 <> 0.
DISTA = DISTA + DMBTR1.
ELSE.
DISTA = 0.
ENDIF.
ENDIF.
CLEAR DMBTR1.
ENDSELECT.
ENDIF.
ENDIF. "new line----
ENDIF.
End Of ASR # 8269 RKSHARMA----
ENDIF.
CLEAR BSEG.
ENDSELECT.
ENDFORM. " GET_DATA_FOR_DISCOUNT_TAKEN
*& Form GET_DATA_FOR_DISCOUNT_LOST
text
--> p1 text
<-- p2 text
FORM GET_DATA_FOR_DISCOUNT_LOST.
Start Commented by JASSI on 04/14/04 - ASR# 23240
DISTOT = DISER.
DISTOT = DISTOT+0(13).
DISLO = DISTOT - DISTA.
End Commented by JASSI on 04/14/04 - ASR# 23240
Inserted By Jassi on 04/14/04 - ASR# 23240
Fetch the Data for Discount Lost from
Table 'REGUH' - Payment data from payment program
SELECT SINGLE * FROM REGUH WHERE LAUFD = PAYR-LAUFD AND
LAUFI = PAYR-LAUFI AND
ZBUKR = PAYR-ZBUKR AND
LIFNR = PAYR-LIFNR AND
KUNNR = PAYR-KUNNR AND
EMPFG = PAYR-EMPFG AND
VBLNR = PAYR-VBLNR .
IF SY-SUBRC = 0.
DISLO = REGUH-SKVHW.
ENDIF.
End of Insertion on 04/14/04 - ASR# 23240
ENDFORM. " GET_DATA_FOR_DISCOUNT_LOSTHi,
I had exactly the same error on printout.
My case was that if the print out is more than 10 pages, the page number was printed as */21' instead of '10/21'.
And the total quantity was not displayed correctly when return.
I asked my ABAPer to check again how wide the space is for being reserved for the total quantity and page number.
As ABAPer increased the space, it solved this problem.
Regards, -
Dynamic columns in report... NON ALV REPORT
Hey Guys,
I have a internal table which has abt 50 columns now i wanna show only the columns that have any value in it...
Now this is not an ALV report... this is a basic report....
So anyideas as to where i can start on this.... i dont want to write if conditions...
i am tryin to make this as elegent as possible...
all help will be appreciated
ThanksHi,
Try this..
In this example..I have an internal table with the columns MATNR, WERKS, LGORT & MENGE...The ITAB is having value only for matnr and werks..It will print only MATNR and WERKS in the output..
<b>* Data declarations.</b>
DATA: BEGIN OF itab OCCURS 0,
matnr TYPE matnr,
werks TYPE werks_d,
lgort TYPE mard-lgort,
menge TYPE ekpo-menge,
END OF itab.
DATA: BEGIN OF itab_desc OCCURS 0,
compname(30),
text(20),
END OF itab_desc.
DATA: v_repid TYPE syrepid.
DATA: t_comp LIKE rstrucinfo OCCURS 0 WITH HEADER LINE.
FIELD-SYMBOLS: <fs>.
DATA: t_allowed_fields(30) OCCURS 0 WITH HEADER LINE.
<b>* Program.</b>
v_repid = sy-repid.
<b>* Sample data.</b>
itab-matnr = 'TEST'. itab-lgort = '0001'.APPEND itab.
itab-matnr = 'TEST12'. itab-lgort = '0001'.APPEND itab.
itab-matnr = 'TEST123'.itab-lgort = '0001'.APPEND itab.
<b>* Store the columns texts.</b>
itab_desc-compname = 'MATNR'. itab_desc-text = 'Material'.
APPEND itab_desc.
itab_desc-compname = 'WERKS'. itab_desc-text = 'Plant'.
APPEND itab_desc.
itab_desc-compname = 'LGORT'. itab_desc-text = 'Sto. Loc'.
APPEND itab_desc.
itab_desc-compname = 'MENGE'. itab_desc-text = 'Quantity'.
APPEND itab_desc.
<b>* Get the components for that internal table.</b>
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = v_repid
fieldname = 'ITAB'
TABLES
components = t_comp.
<b>* Get the columns that has some value.</b>
LOOP AT t_comp.
LOOP AT itab.
ASSIGN COMPONENT t_comp-compname OF STRUCTURE itab TO <fs>.
IF NOT <fs> IS INITIAL.
EXIT.
ENDIF.
ENDLOOP.
Allowed columns.
IF NOT <fs> IS INITIAL.
t_allowed_fields = t_comp-compname.
APPEND t_allowed_fields.
ENDIF.
ENDLOOP.
<b>* Print the Header.</b>
LOOP AT t_allowed_fields.
READ TABLE t_comp WITH KEY compname = t_allowed_fields.
READ TABLE itab_desc WITH KEY compname = t_allowed_fields.
WRITE: AT (t_comp-olen) itab_desc-text COLOR COL_HEADING.
ENDLOOP.
<b>* Print the data.</b>
LOOP AT itab.
WRITE: / space.
LOOP AT t_allowed_fields.
READ TABLE t_comp WITH KEY compname = t_allowed_fields.
ASSIGN COMPONENT t_comp-compname OF STRUCTURE itab TO <fs>.
WRITE: AT (t_comp-olen) <fs>.
ENDLOOP.
ENDLOOP.
Thanks,
Naren -
Hi Experts,
I have Written this below code to upload Delivery with refrence to sales orders with batch split . when i execute this program it is retuning the message that the transfered sales order table is empty.
If i change the document_catogy_sd = ' L '.
then its not retuning any message but its not creating any deliveries. please find and fix the problem in this program.
FIELD_NAME = ' '
IMPORTING
FILE_NAME = L_FILE1
IF NOT L_FILE1 IS INITIAL.
P_FILE1 = L_FILE1.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = L_FILE2
IF NOT L_FILE2 IS INITIAL.
P_FILE2 = L_FILE2.
ENDIF.
START-OF-SELECTION.
PERFORM F_UPLOAD TABLES ITAB USING P_FILE1.
PERFORM F_UPLOAD1 TABLES ITAB1 USING P_FILE2.
SORT ITAB1 BY VBELN.
ITAB1[] = ITAB[] .
LOOP AT ITAB.
ITABL-DOCUMENT_CATEGORY_SD = 'J'.
ITABL-DOCUMENT_NUMB = ITAB-VBELN.
ITABL-DOCUMENT_ITEM = ITAB-ITEMNO.
ITABL-RECEIVING_POINT = ITAB-VSTEL.
ITABL-DATE = ITAB-VSTEL.
ITABL-DELIVERY_DATE = ITAB-WADAT.
ITABL-GOODS_ISSUE_DATE = ITAB-WADAT_IST.
ITABL-LOADING_DATE = ITAB-LDDAT.
ITABL-MAT_AVAILABIL_DATE = ITAB-MBDAT.
ITABL-MATERIAL = ITAB-MATNR.
ITABL-QUANTITY_SALES_UOM = ITAB-SOQTY.
IT_FINAL-DOCUMENT_NUMB = ITAB-VBELN.
IT_FINAL-DOCUMENT_ITEM = ITAB-ITEMNO.
IT_FINAL-RECEIVING_POINT = ITAB-VSTEL.
IT_FINAL-DATE = ITAB-VSTEL.
IT_FINAL-DELIVERY_DATE = ITAB-WADAT.
IT_FINAL-GOODS_ISSUE_DATE = ITAB-WADAT_IST.
IT_FINAL-LOADING_DATE = ITAB-LDDAT.
IT_FINAL-MAT_AVAILABIL_DATE = ITAB-MBDAT.
IT_FINAL-MATERIAL = ITAB-MATNR.
IT_FINAL-QUANTITY_SALES_UOM = ITAB-SOQTY.
it_doc-DOCUMENT_CATEGORY_SD = 'J'.
append it_doc.
APPEND IT_FINAL.
LOOP AT ITAB1 WHERE VBELN = ITAB-VBELN AND ITEMNO = ITAB-ITEMNO.
ITABL-STGE_LOC = ITAB1-LGORT.
ITABL-BATCH = ITAB1-CHARG.
itabl-QUANTITY_BASE__UOM = itab1-lfimg.
itab1-MAT_AVAILABIL_DATE = itab1-mbdat.
IT_FINAL-STGE_LOC = ITAB1-LGORT.
IT_FINAL-BATCH = ITAB1-CHARG.
*it_final-lfimg = itab1-lfimg.
APPEND IT_FINAL.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
EXPORTING
DELIVERY_EXTEND =
TECHN_CONTROL =
TABLES
REQUEST = IT_FINAL
PARTNER =
PARTNER_ADDR =
TEXT_HEADER =
TEXT_LINES =
CREATEDITEMS = it_doc
RETURN = IT_RETUN .
EXTENSION1 =
EXTENSION2 =
CO_CHAR_VALUES =
BATCH_ATTRIBUTES =
BATCH_VALUES_CHAR =
BATCH_VALUES_CURR =
BATCH_VALUES_NUM =
TOKENREFERENCE =
WRITE: / ' ** S.T.O. HELD WITH DOCUMENT NO ** ', TEXT1.
WRITE: / SPACE.
*loop at iret.
*endloop.
LOOP AT IT_RETUN.
WHERE TYPE = 'A'
OR TYPE = 'E'.
WRITE:/ IT_RETUN-TYPE, ' ', IT_RETUN-MESSAGE.
EXIT.
ENDLOOP.
ENDLOOP.
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
commit work and WAIT.
ENDIF.
*& Form f_upload
text
-->P_ITAB text
-->P_P_FILE1 text
FORM F_UPLOAD TABLES P_ITAB STRUCTURE ITAB
USING P_P_FILE1.
DATA: V_FILE TYPE STRING.
V_FILE = P_P_FILE1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " f_upload
*& Form f_upload1
text
-->P_ITAB1 text
-->P_P_FILE2 text
FORM F_UPLOAD1 TABLES P_ITAB1 STRUCTURE ITAB1
USING P_P_FILE2.
DATA: V_FILE1 TYPE STRING.
V_FILE1 = P_P_FILE2.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = V_FILE1
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB1.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " f_upload1
Thanks in Advance...
Points Rewarded.
Regards.
Ravi...
Message was edited by:
Ravi reddyHi Naveen,
Thanks for the reply. Even after using FM QAVE_PROCESS_AUTO_UD,when i execute
BAPI_GOODSMVT_CREATE, the same thing is happening.I am unable to see the stock deducted in QA33.
Is there any input in the goods mvt bapi where we can provide inspection lot no since i believe that the goods mvt has to get connected with the inspection lot. -
Abap program causing MEMORY_NO_MORE_PAGING
Please help me to crack the code, which is causing the dump MEMORY_NO_MORE_PAGING.
============================================================
report AQA0ZFINAPP=====ZFINAPP_ARINV=
line-size 255 no standard page heading line-count 000(001).
include <symbol>.
include <icon>.
selection-screen: begin of block prog
with frame title text-f58.
tables BKPF.
data %count-BKPF(4) type x.
data %linr-BKPF(2).
tables BSEG.
data %count-BSEG(4) type x.
data %linr-BSEG(2).
tables T001.
data %count-T001(4) type x.
data %linr-T001(2).
tables aqldb.
include rsaqexcd.
data: begin of %st_liste occurs 100,
head(1),
tab(3),
line(6) type n,
cont(1) type n,
fint(1),
finv(1),
fcol(1) type n,
text(0255),
end of %st_liste.
data %data_selected(1).
data %glframe(1) value 'X' .
data %uflag(1).
data %ustflag(1).
data %grst_text(255).
data %glline type i.
data %tabix like sy-tabix.
data %prflag(1) type x value '02'.
data: %textpool_read(1),
%textpool_langu type textpool occurs 0,
%textpool_langu_line type textpool.
data: %txt1 type textpool-entry,
%txt2 type textpool-entry,
%txt3 type textpool-entry,
%txtkey type textpool-key,
%txt_unknown type textpool-entry value 'UNKNOWN TEXT'.
data TEXT_BKPF_BLART like T003T-LTEXT.
data TEXT_BKPF_BUKRS like T001-BUTXT.
data TEXT_BKPF_USNAM like ADDR3_VAL-NAME_TEXT.
data TEXT_BSEG_BUKRS like T001-BUTXT.
data TEXT_BSEG_KUNNR like KNA1-NAME1.
data TEXT_BSEG_SEGMENT like FAGL_SEGMT-NAME.
data TEXT_BSEG_SHKZG like DD07D-DDTEXT.
data TEXT_BSEG_ZZCOMM_CD like ZCOMMODITY-ZZCOMM_DS.
data TEXT_BSEG_ZZMFG_CD like ZMFG-ZZMFG_DS.
data TEXT_EKKO_LIFNR like LFA1-NAME1.
data %perc(4) type p decimals 3.
data %p100(4) type p decimals 3 value '100.000'.
data %rangct type i.
data %rangcc(8).
select-options SP$00001 for BKPF-BLART memory id BAR.
select-options SP$00002 for BKPF-BLDAT.
select-options SP$00003 for BKPF-BUDAT.
select-options SP$00005 for BKPF-BUKRS memory id BUK.
select-options SP$00004 for BKPF-GJAHR memory id GJR.
selection-screen skip 1.
selection-screen: begin of block direct
with frame title text-f59.
selection-screen: begin of line.
*selection-screen: comment 1(12) text-f57.
selection-screen: pushbutton 75(18) pb%exco user-command expcol
modif id new.
selection-screen: end of line.
selection-screen: begin of line.
parameters: %alv radiobutton group func user-command outbut
modif id new default 'X' .
selection-screen: comment 4(26) text-f72 for field %alv
modif id new.
parameters: %alvl type slis_vari modif id new.
selection-screen: end of line.
selection-screen: begin of line.
parameters: %nofunc radiobutton group func modif id old.
selection-screen: comment 4(26) text-f66 for field %nofunc
modif id old.
parameters: %tview radiobutton group func modif id old.
selection-screen: comment 34(26) text-f68 for field %tview
modif id old,
end of line.
selection-screen: begin of line.
parameters: %graph radiobutton group func modif id old.
selection-screen: comment 4(26) text-f61 for field %graph
modif id old.
parameters: %text radiobutton group func modif id old.
selection-screen: comment 34(26) text-f69 for field %text
modif id old,
end of line.
selection-screen: begin of line.
parameters: %abc radiobutton group func modif id old.
selection-screen: comment 4(26) text-f70 for field %abc
modif id old.
parameters: %excel radiobutton group func modif id old.
selection-screen: comment 34(26) text-f60 for field %excel
modif id old,
end of line.
selection-screen: begin of line.
selection-screen: end of line.
selection-screen: begin of line.
parameters: %xint radiobutton group func modif id xin.
selection-screen: comment 4(26) text-f73 for field %xint
modif id xin.
parameters: %xintk like AQXINT-XIKEY lower case modif id xin.
selection-screen: end of line.
selection-screen: begin of line.
parameters: %down radiobutton group func modif id old.
selection-screen: comment 4(26) text-f64 for field %down
modif id old.
parameters: %path type AQ_FILENAME lower case modif id old.
selection-screen: end of line.
selection-screen: begin of line.
parameters: %save radiobutton group func modif id lis.
selection-screen: comment 4(26) text-f62 for field %save
modif id lis.
parameters: %listid like AQCAQL-TEXT visible length 40
lower case modif id lis.
selection-screen: end of line.
selection-screen: end of block direct.
selection-screen: end of block prog.
data: begin of %g00 occurs 100,
BKPF-BUKRS like BKPF-BUKRS,
BKPF-BELNR like BKPF-BELNR,
BKPF-BLART like BKPF-BLART,
BKPF-BLDAT like BKPF-BLDAT,
BKPF-BUDAT like BKPF-BUDAT,
BKPF-WWERT like BKPF-WWERT,
BKPF-XBLNR like BKPF-XBLNR,
BKPF-BKTXT like BKPF-BKTXT,
BKPF-AWKEY like BKPF-AWKEY,
BSEG-XREF1 like BSEG-XREF1,
BSEG-XREF2 like BSEG-XREF2,
BSEG-BUKRS like BSEG-BUKRS,
BSEG-BUZEI like BSEG-BUZEI,
BSEG-HKONT like BSEG-HKONT,
BSEG-SEGMENT like BSEG-SEGMENT,
BSEG-PRCTR like BSEG-PRCTR,
BSEG-KOSTL like BSEG-KOSTL,
BSEG-ZZCOMM_CD like BSEG-ZZCOMM_CD,
BSEG-ZZMFG_CD like BSEG-ZZMFG_CD,
TEXT_BSEG_SHKZG like TEXT_BSEG_SHKZG,
BSEG-WRBTR like BSEG-WRBTR,
BKPF-WAERS-0121 like BKPF-WAERS,
BSEG-DMBTR like BSEG-DMBTR,
T001-WAERS-0122 like T001-WAERS,
BSEG-DMBE2 like BSEG-DMBE2,
BKPF-HWAE2-0123 like BKPF-HWAE2,
BSEG-DMBE3 like BSEG-DMBE3,
BKPF-HWAE3-0124 like BKPF-HWAE3,
BSEG-KUNNR like BSEG-KUNNR,
TEXT_BSEG_KUNNR like TEXT_BSEG_KUNNR,
end of %g00.
data: begin of %%g00,
BKPF-BUKRS(004),
BKPF-BELNR(010),
BKPF-BLART(002),
BKPF-BLDAT(010),
BKPF-BUDAT(010),
BKPF-WWERT(010),
BKPF-XBLNR(016),
BKPF-BKTXT(025),
BKPF-AWKEY(020),
BSEG-XREF1(012),
BSEG-XREF2(012),
BSEG-BUKRS(004),
BSEG-BUZEI(003),
BSEG-HKONT(010),
BSEG-SEGMENT(010),
BSEG-PRCTR(010),
BSEG-KOSTL(010),
BSEG-ZZCOMM_CD(003),
BSEG-ZZMFG_CD(004),
TEXT_BSEG_SHKZG(060),
BSEG-WRBTR(016),
BKPF-WAERS-0121 like BKPF-WAERS,
BSEG-DMBTR(016),
T001-WAERS-0122 like T001-WAERS,
BSEG-DMBE2(016),
BKPF-HWAE2-0123 like BKPF-HWAE2,
BSEG-DMBE3(016),
BKPF-HWAE3-0124 like BKPF-HWAE3,
BSEG-KUNNR(010),
TEXT_BSEG_KUNNR(035),
end of %%g00.
data %znr type i.
data %lznr type i value 99999.
field-groups header.
field-groups %fg01.
data %any-01.
controls tview100 type tableview using screen 100.
AT SELECTION-SCREEN.
perform alvl_check(rsaqexce) using %alvl 'G00'.
perform testmode(rsaqexce).
perform check_expcol(rsaqexce) using %alv.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR %ALVL.
perform alvl_value_request(rsaqexce) using %alvl 'G00'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR %XINTK.
perform xint_value_request(rsaqexce).
AT SELECTION-SCREEN OUTPUT.
perform save_initial_sscr(rsaqexce).
perform rinit(rsaqbrst).
perform set_expcol(rsaqexce) using %alv pb%exco.
perform alvl_set_invisible(rsaqexce).
perform set_xint_params(rsaqexce).
INITIALIZATION.
perform init_xint(rsaqexce).
perform set_www_flags(rsaqexce).
perform init_print_params(rsaqexce).
if %textpool_read is initial.
read textpool sy-repid into %textpool_langu language sy-langu.
%textpool_read = 'X'.
endif.
START-OF-SELECTION.
insert %count-BKPF into header.
insert %linr-BKPF into header.
insert %count-BSEG into header.
insert %linr-BSEG into header.
insert BKPF-BUKRS into %fg01.
insert BKPF-BELNR into %fg01.
insert BKPF-BLART into %fg01.
insert BKPF-BLDAT into %fg01.
insert BKPF-BUDAT into %fg01.
insert BKPF-WWERT into %fg01.
insert BKPF-XBLNR into %fg01.
insert BKPF-BKTXT into %fg01.
insert BKPF-AWKEY into %fg01.
insert BSEG-XREF1 into %fg01.
insert BSEG-XREF2 into %fg01.
insert BSEG-BUKRS into %fg01.
insert BSEG-BUZEI into %fg01.
insert BSEG-HKONT into %fg01.
insert BSEG-SEGMENT into %fg01.
insert BSEG-PRCTR into %fg01.
insert BSEG-KOSTL into %fg01.
insert BSEG-ZZCOMM_CD into %fg01.
insert BSEG-ZZMFG_CD into %fg01.
insert TEXT_BSEG_SHKZG into %fg01.
insert BSEG-WRBTR into %fg01.
insert BKPF-WAERS into %fg01.
insert BSEG-DMBTR into %fg01.
insert T001-WAERS into %fg01.
insert BSEG-DMBE2 into %fg01.
insert BKPF-HWAE2 into %fg01.
insert BSEG-DMBE3 into %fg01.
insert BKPF-HWAE3 into %fg01.
insert BSEG-KUNNR into %fg01.
insert TEXT_BSEG_KUNNR into %fg01.
perform init_texthandling(rsaqexce) using 'CL_TEXT_IDENTIFIER' ' ' 'ZFINAPP_BRM'.
"webgui
data: %ret type i.
if sy-subrc is initial and %excel is not initial.
perform check_wingui(rsaqsyst) using %ret.
if %ret <> 0.
message e842(aq).
endif.
endif.
"webgui
perform %comp_ldesc.
GET BKPF .
%dbacc = %dbacc - 1.
if %dbacc = 0.
stop.
endif.
check SP$00001.
check SP$00002.
check SP$00003.
check SP$00005.
check SP$00004.
add 1 to %count-BKPF.
%linr-BKPF = '99'.
GET BSEG .
%dbacc = %dbacc - 1.
if %dbacc = 0.
perform %_get_BKPF_late in program (sy-cprog) if found
using %selected BKPF.
stop.
endif.
perform textfield_refresh(rsaqexce).
perform textfield_context(rsaqexce) using 'BSEG' BSEG.
perform textfield_context(rsaqexce) using 'BKPF' BKPF.
perform textfield_call(rsaqexce) using BSEG 'BSEG' 'KUNNR' TEXT_BSEG_KUNNR.
perform textfield_call(rsaqexce) using BSEG 'BSEG' 'SHKZG' TEXT_BSEG_SHKZG.
add 1 to %count-BSEG.
%linr-BSEG = '01'.
extract %fg01.
%linr-BSEG = '99'.
END-OF-SELECTION.
sort as text.
%diact = space.
%printon = space.
%batch = sy-batch.
if %batch <> space.
if %alv <> space.
%diact = 'V'.
%printon = 'X'.
%alv_layout = %alvl.
new-page print on destination 'NULL' no dialog
line-size 0255 line-count 0065.
endif.
if %save <> space.
%diact = 'S'.
%printon = 'X'.
new-page print on destination 'NULL' no dialog
line-size 0255 line-count 0065.
endif.
elseif %called_by_www <> space.
%diact = space.
elseif %called_by_www_alv <> space.
%diact = 'V'.
else.
perform init_print_params(rsaqexce).
if %save <> space. %diact = 'S'. endif.
if %xint <> space. %diact = 'I'. endif.
if %tview <> space. %diact = 'T'. endif.
if %alv <> space. %diact = 'V'. endif.
if %down <> space. %diact = 'D'. endif.
if %graph <> space. %diact = 'G'. endif.
if %excel <> space. %diact = 'X'. endif.
if %text <> space. %diact = 'W'. endif.
if %abc <> space. %diact = 'A'. endif.
if %diact <> space and %diact <> 'S' and %diact <> 'W'.
%printon = 'X'.
new-page print on destination 'NULL' no dialog
line-size 0255 line-count 0065.
endif.
%pathname = %path.
if %diact = 'I'.
%functionkey = %xintk.
endif.
if %diact = 'V'.
%alv_layout = %alvl.
endif.
endif.
free memory id 'AQLISTDATA'.
if %memmode <> space.
if %batch <> space and %printon = space.
%printon = 'X'.
new-page print on destination 'NULL' no dialog
line-size 0255 line-count 0065.
endif.
%diact = '1'.
endif.
%titel = ' '.
if sy-subty o %prflag and %titel = space.
new-page with-title.
endif.
%tvsize = 0200.
%pline = 1.
%pzgr = 1.
%first = 'X'.
perform %output.
%first = space.
if %diact <> space and %diact <> 'S'.
if %batch = space.
new-page print off.
if not ( %diact = 'V' and %ucomm = 'PRIN' ).
new-page no-heading no-title.
write space.
endif.
endif.
else.
perform pf-status(rsaqexce) using 'XX '.
endif.
clear: %tab, %line, %cont.
if %data_selected = space.
if %diact = '1'.
export empty from %empty to memory id 'AQLISTDATA'.
leave.
else.
if %batch = space and
%called_by_www = space and
%called_by_www_alv = space.
message s260(aq).
leave list-processing.
else.
if %called_by_www_alv = space.
%diact = space.
endif.
endif.
endif.
endif.
if %diact = 'S'.
perform %save_list.
leave list-processing.
endif.
if %diact = 'V' and %batch <> space.
new-page print off.
perform set_print_params(rsaqexce).
perform %download using 'ALV'.
leave.
endif.
if %diact = 'V' and %called_by_www_alv <> space.
perform %download using 'ALV'.
leave.
endif.
*if %diact = 'V' and ( %ucomm = 'PRIN' or sy-subty = '07' ).
data %is_submit_to_spool type c.
if %diact = 'V'.
CALL FUNCTION 'IS_SUBMIT_TO_SPOOL'
IMPORTING FLAG = %is_submit_to_spool.
if ( %ucomm = 'PRIN' or %is_submit_to_spool = 'X' ).
perform set_print_params(rsaqexce).
perform %download using 'ALV'.
set parameter id 'SPI' field sy-spono.
leave list-processing.
endif.
endif.
if %diact = 'P' and %batch <> space.
perform %download using '+DAT'.
leave list-processing.
endif.
if %diact = 'E' and %batch <> space.
perform %download using 'EIS'.
leave list-processing.
endif.
if %diact = '1'.
perform %download using '+MEM'.
leave.
endif.
if %diact = 'X'.
set user-command 'XXL'.
elseif %diact = 'W'.
set user-command 'TEXT'.
elseif %diact = 'V'.
set user-command 'ALV'.
elseif %diact = 'T'.
set user-command 'VIEW'.
elseif %diact = 'G'.
set user-command 'GRAF'.
elseif %diact = 'A'.
set user-command 'ABCA'.
elseif %diact = 'E'.
set user-command 'EIS'.
elseif %diact = 'D'.
set user-command 'DOWN'.
elseif %diact = 'I'.
set user-command 'XINT'.
elseif %diact = 'P'.
set user-command '+DAT'.
endif.
TOP-OF-PAGE.
perform %top-of-page.
END-OF-PAGE.
perform page_foot(rsaqexce).
perform %save_page.
TOP-OF-PAGE DURING LINE-SELECTION.
perform %top-of-page.
AT USER-COMMAND.
case sy-ucomm.
when 'EXIT'.
leave program.
when 'RETN'.
perform return(rsaqexce).
when 'CANC'.
perform return(rsaqexce).
when 'WEIT'.
perform return(rsaqexce).
when 'INHA'.
perform catalogue(rsaqexce).
when 'AUSL'.
perform pickup(rsaqexce).
when 'AUSW'.
perform pickup(rsaqexce).
when 'RCAA'.
perform rchain(rsaqbrst).
when 'RCAL'.
perform rcall(rsaqbrst).
when 'VGLI'.
perform change(rsaqexce).
when 'VGLE'.
perform change(rsaqexce).
when 'TOTO'.
perform change(rsaqexce).
when 'VSTA'.
perform change(rsaqexce).
when 'VSTE'.
perform return(rsaqexce).
when 'SAVL'.
perform %save_list.
when 'ODRU'.
perform print_list(rsaqexce).
when 'COPA'.
perform print_cover_page(rsaqexce).
when 'TEXT'.
perform %download using 'TEXT'.
when 'ALV'.
perform %download using 'ALV'.
when 'VIEW'.
perform %view.
when 'XXL'.
perform %download using 'XXL'.
when 'GRAF'.
perform %download using 'GRAF'.
when 'ABCA'.
perform %download using 'ABCA'.
when 'DOWN'.
perform %download using 'DOWN'.
when 'XINT'.
perform %download using 'XINT'.
endcase.
clear: %cline, %zgr.
clear: %tab, %line, %cont.
if %diact <> space.
leave list-processing.
endif.
form %comp_ldesc.
refresh %ldesc.
refresh %gdesc.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A00'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B00'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00010000X004 00 01'
%txt1 %txt2 %txt3 'BKPF-BUKRS' BKPF-BUKRS 'BKPF-BUKRS'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A01'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B01'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00020000X010 00 01'
%txt1 %txt2 %txt3 'BKPF-BELNR' BKPF-BELNR 'BKPF-BELNR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A02'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B02'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00030000X002 00 01'
%txt1 %txt2 %txt3 'BKPF-BLART' BKPF-BLART 'BKPF-BLART'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A03'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B03'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00040000X010 00 01'
%txt1 %txt2 %txt3 'BKPF-BLDAT' BKPF-BLDAT 'BKPF-BLDAT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A04'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B04'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00050000X010 00 01'
%txt1 %txt2 %txt3 'BKPF-BUDAT' BKPF-BUDAT 'BKPF-BUDAT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A05'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B05'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00060000X010 00 01'
%txt1 %txt2 %txt3 'BKPF-WWERT' BKPF-WWERT 'BKPF-WWERT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A06'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B06'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00070000X016 00 01'
%txt1 %txt2 %txt3 'BKPF-XBLNR' BKPF-XBLNR 'BKPF-XBLNR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A07'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B07'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00080000X025 00 01'
%txt1 %txt2 %txt3 'BKPF-BKTXT' BKPF-BKTXT 'BKPF-BKTXT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A08'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B08'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00090000X020 00 01'
%txt1 %txt2 %txt3 'BKPF-AWKEY' BKPF-AWKEY 'BKPF-AWKEY'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A09'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B09'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00100000X012 00 01'
%txt1 %txt2 %txt3 'BSEG-XREF1' BSEG-XREF1 'BSEG-XREF1'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A10'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B10'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H00'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00110000X012 00 01'
%txt1 %txt2 %txt3 'BSEG-XREF2' BSEG-XREF2 'BSEG-XREF2'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A11'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B11'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00120000X004 00 02'
%txt1 %txt2 %txt3 'BSEG-BUKRS' BSEG-BUKRS 'BSEG-BUKRS'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A12'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B12'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00130000X003 00 02'
%txt1 %txt2 %txt3 'BSEG-BUZEI' BSEG-BUZEI 'BSEG-BUZEI'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A13'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B13'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00140000X010 00 02'
%txt1 %txt2 %txt3 'BSEG-HKONT' BSEG-HKONT 'BSEG-HKONT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A14'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B14'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00150000X010 00 02'
%txt1 %txt2 %txt3 'BSEG-SEGMENT' BSEG-SEGMENT 'BSEG-SEGMENT'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A15'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B15'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00160000X010 00 02'
%txt1 %txt2 %txt3 'BSEG-PRCTR' BSEG-PRCTR 'BSEG-PRCTR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A16'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B16'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00170000X010 00 02'
%txt1 %txt2 %txt3 'BSEG-KOSTL' BSEG-KOSTL 'BSEG-KOSTL'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A17'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B17'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00180000X003 00 02'
%txt1 %txt2 %txt3 'BSEG-ZZCOMM_CD' BSEG-ZZCOMM_CD 'BSEG-ZZCOMM_CD'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A18'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B18'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00190000X004 00 02'
%txt1 %txt2 %txt3 'BSEG-ZZMFG_CD' BSEG-ZZMFG_CD 'BSEG-ZZMFG_CD'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A19'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B19'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00201000X060 00 02'
%txt1 %txt2 %txt3 'TEXT_BSEG_SHKZG' TEXT_BSEG_SHKZG 'TEXT_BSEG_SHKZG'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A20'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B20'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00211063 016F 00 02'
%txt1 %txt2 %txt3 'BSEG-WRBTR' BSEG-WRBTR 'BSEG-WRBTR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A21'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B21'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00221000 005W 00 02'
%txt1 %txt2 %txt3 'BKPF-WAERS' BKPF-WAERS 'BKPF-WAERS-0121'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A22'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B22'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00231086 016F 00 02'
%txt1 %txt2 %txt3 'BSEG-DMBTR' BSEG-DMBTR 'BSEG-DMBTR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A23'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B23'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00241000 005W 00 02'
%txt1 %txt2 %txt3 'T001-WAERS' T001-WAERS 'T001-WAERS-0122'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A24'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B24'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00251109 016F 00 02'
%txt1 %txt2 %txt3 'BSEG-DMBE2' BSEG-DMBE2 'BSEG-DMBE2'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A25'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B25'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00261000 005W 00 02'
%txt1 %txt2 %txt3 'BKPF-HWAE2' BKPF-HWAE2 'BKPF-HWAE2-0123'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A26'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B26'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00271132 016F 00 02'
%txt1 %txt2 %txt3 'BSEG-DMBE3' BSEG-DMBE3 'BSEG-DMBE3'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A27'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B27'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00281000 005W 00 02'
%txt1 %txt2 %txt3 'BKPF-HWAE3' BKPF-HWAE3 'BKPF-HWAE3-0124'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A28'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B28'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00291000X010 00 02'
%txt1 %txt2 %txt3 'BSEG-KUNNR' BSEG-KUNNR 'BSEG-KUNNR'.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'A29'.
if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
else. %txt1 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'B29'.
if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
else. %txt2 = %txt_unknown.
endif.
read table %textpool_langu into %textpool_langu_line
with key key = 'H01'.
if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
else. %txt3 = %txt_unknown.
endif.
perform ldesc(rsaqexce) using 'G00301000X035 00 02'
%txt1 %txt2 %txt3 'TEXT_BSEG_KUNNR' TEXT_BSEG_KUNNR 'TEXT_BSEG_KUNNR'.
perform gdesc(rsaqexce) using 'G00' 1 20 ' ' ' ' 'X'.
perform complete_ldesc(rsaqexce) tables %ldesc.
endform.
form %read_ldesc using p_lid type aql_lid
p_ldesc type rsaqtldesc.
p_lid = 'G00'.
perform %comp_ldesc.
p_ldesc[] = %ldesc[].
endform.
form %output.
describe table %prlist lines %max_prlist.
%head = 'AAA'.
%keyempty = space.
new-page.
perform %output_gl.
perform complete_page(rsaqexce).
%head = 'ZZZ'.
perform last_ptab_entry(rsaqexce).
new-page.
if %keyempty <> space.
message s894(aq).
endif.
endform.
form %top-of-page.
if sy-ucomm = 'INHA'. exit. endif.
if sy-ucomm = 'COPA'. exit. endif.
if %head = space. exit. endif.
if %head = 'DDD'.
perform tviewpage(rsaqexce).
exit.
endif.
if %head = 'GGG'.
perform page(rsaqexce) using 'G00' text-grl 205 %glframe 001.
set left scroll-boundary column 002.
perform set_scroll_boundary(rsaqexce) using 002.
if %toto <> space. exit. endif.
else.
case %head.
when others.
endcase.
endif.
endform.
form %newline.
data: %llen type i.
%llen = 205.
%uflag = space.
new-line.
write: '|', 205 '|'.
position 2.
endform.
form %skip using count.
if sy-linno > 1.
%uflag = space.
do count times.
new-line.
format reset.
write: '|', 205 '|'.
enddo.
endif.
endform.
form %uline.
if %uflag = space.
if sy-linno > 1.
uline /1(205).
endif.
%uflag = 'X'.
endif.
endform.
form %hide.
if %batch <> space and %diact = 'S'.
perform hide(rsaqexce).
else.
hide: %tab, %line, %cont.
endif.
endform.
form %hide_color.
if %batch <> space and %diact = 'S'.
perform hide_color(rsaqexce).
else.
hide: %fint, %fcol.
endif.
endform.
form %rcall using name value.
field-symbols <field>.
assign (name) to <field>.
if sy-subrc <> 0.
value = space.
exit.
endif.
read current line field value <field> into value.
if value = space and %tab = 'G00' and %ldesc-fcur na 'FM'.
read table %g00 index %line.
if sy-subrc = 0.
assign component %ldesc-fnameint of structure %g00
to <field>.
if sy-subrc = 0.
write <field> to value(%ldesc-folen).
endif.
endif.
endif.
endform.
form %save_page.
if %batch <> space and %diact = 'S'.
perform save_page(rsaqexce) tables %st_liste.
endif.
endform.
form %replace_var using text.
field-symbols <var>.
assign text+1(*) to <var>.
endform.
form %save_list.
data: %sflag,
qreport like sy-repid.
if %diact = 'S'. %sflag = 'X'. endif.
qreport = sy-repid.
perform save_list(rsaqexce) tables %st_liste
using qreport %sflag %listid.
if %ql_id <> space.
%dlflag = 'X'.
%listsize = 0255.
perform comp_selection_screen(rsaqexce).
export %st_liste %ptab %ldesc %gdesc %dlflag %listsize
%selections
%g00
to database aqldb(aq) id %ql_id.
endif.
endform.
form %refresh.
case %tab.
when 'G00'.
import %g00 from database aqldb(aq) id %ql_id.
endcase.
endform.
form %download using code.
data: qreport like sy-repid.
perform init_download(rsaqexce).
qreport = sy-repid.
case %tab.
when 'G00'.
perform download(rsaqexce)
tables %g00 using code qreport text-grl.
when others.
message s860(aq).
endcase.
endform.
form %set_data changing l_lines type i.
import ldata to %g00 from memory id 'AQLISTDATA'.
describe table %g00 lines l_lines.
free memory id 'AQLISTDATA'.
endform.
form %get_data tables datatab structure %g00
using first type i
last type i.
append lines of %g00 from first to last to datatab.
endform.
form %get_ref_to_table using lid like rsaqldesc-lid
ref_to_itab type ref to data
subrc like sy-subrc.
subrc = 0.
case lid.
when 'G00'.
create data ref_to_itab like %g00[].
when others.
subrc = 4.
message s860(aq).
endcase.
endform.
form %view.
data: ret type i.
perform check_wingui(rsaqsyst) using ret.
if ret <> 0.
message s841(aq).
perform %download using 'ALV'.
exit.
endif.
data: anz type i,
prog like sy-repid.
prog = sy-repid.
perform init_download(rsaqexce).
case %tab.
when 'G00'.
perform generate_view_dynpro(rsaqexce)
using prog text-grl.
describe table %g00 lines anz.
tview100-lines = anz.
perform init_view(rsaqexce) tables %g00 using tview100.
call screen 100.
perform reset_view_dynpro(rsaqexce).
when others.
message s860(aq).
endcase.
endform.
form %colhead_print changing lines like sy-linno
hflag type c.
data: l_text(255).
if %textpool_read is initial.
read textpool sy-cprog into %textpool_langu language sy-langu.
%textpool_read = 'X'.
endif.
lines = lines + 2.
if 2 = 0. clear hflag. else. hflag = 'X'. endif.
write at (1) '|' no-gap.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'B001'.
if sy-subrc is initial.
l_text = %textpool_langu_line-entry.
else.
clear l_text.
endif.
perform replace_vars(rsaqexce) using l_text 'X'.
write at 000(004) l_text(004) no-gap.
write at (1) '|' no-gap.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'B011'.
if sy-subrc is initial.
l_text = %textpool_langu_line-entry.
else.
clear l_text.
endif.
perform replace_vars(rsaqexce) using l_text 'X'.
write at 000(010) l_text(010) no-gap.
write at (1) '|' no-gap.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'B021'.
if sy-subrc is initial.
l_text = %textpool_langu_line-entry.
else.
clear l_text.
endif.
perform replace_vars(rsaqexce) using l_text 'X'.
write at 000(002) l_text(002) no-gap.
write at (1) '|' no-gap.
read table %textpool_langu into %textpool_langu_line
with key ID = 'I' key = 'B031'.
Hi Vijay,
The code is not developed, this is automatically generated code, when you create a SAP query using SQ01 this code get generated. There is no need to change the code. When you execute this program, then on selection screen give less entries to select.
Regards,
Atish -
Hi,
I have problem with data mask in ALV grid.
In itab I have data type TIMS, but in grid I want to see instad 15:00:00 just 15:00 and instead 00:00:00 just blank cell.
I tried to solve it using field catalog with value:
ws_field-no_zero = 'X' it works ok, I get blank cells instead zeros but still have 15:00:00 format.
When I added:
ws_field-EDIT_MASK = '__:__'. I see 15:00 but no_zero stoped working ( instead blank fields I see 00:00).
How to connect this two properties?
Joanna.Hi, Joanna.
I think you have only one way - add characater field into your itab where you need write yout TIMS data using mask '__:__' or write space for 00:00:00. And display that field by ALV instead time-field.
PS: Also you can try create own conversion exit and placed it into EDIT_MASK. -
Hi,
i have small doubt in table creation of Smart Forms.
If the no of records in Table are less than the page size.
how to increase the table view till end of the page or till footer?
the table shoould be displayed till fully not truncated upto the no of records
Thanks
Shivashiva we can do this as follows
If we know the max number of line we can print in a puricular page.. then ex.
example maximum 40 lines we can print in a page.. then take thin inot a variable calle <b>v_max_line = 40</b>.
Find the number of record in Internal talbe example <b>v_tabl_line = 10</b>.
v_emtty = v_max_line - v__tabl_line .
now v_empty is 30.
now create a "LOOP" in the "footer" part of the TABALE.
in this loop insert a table line .
take one temparary variable.. increase the value of the "v_temp" veriable "calculation" part ofth "LOOP".
In conditions of the LOOP : give that.. v_temp < v_EMPTY.
Note: dont forget to insert a text elemetn in the line type of the footer "LOOP". in the Text elemtn write &space&.
so that all the blank lines will be printed after the end of the table. -
Regarding Error while executing Bex analyzer after execution
HI,
Need in urgent.
I had created a bex query which contains suppose columns A B C(amounts) , Based on this two columns a formula is created F1 = (AB) and F2 = (BC) and F3 = (F1 / F2) now in this case when F2 does not contain any value it is giving "X" in red color. I tried if as " (F2 <> 0 * (F1/F2)) " it is not working, i thing because when I see the out put in the column F2 where their is no value at that place it is not containing "0" (Zero) But contains space.
I have a thought but not able to implement in the formula " (F2 <> Space * (F1/F2)) " But not able to write space.
So is their any way to solve this.Hi,
U mean when F3 = (F1/F2) and F2 is not having any value then you are getting value of F3 as red X. Their is an inbuilt function to avoid this divide by zero problem.
That inbuilt data function is NDIV0(F3), where F3 = Calculated Key Figure.
You can also set how to display the bex values with transaction RSCUSTV4. Here you can set the display setting for following values in Bex Query Designer:
1. Division by 0
2. Does not exist
3. Mixed Values
4. No Authorization
Check out this link:
http://help.sap.com/saphelp_erp2005/helpdata/en/71/0aec3b6e011341e10000000a114084/content.htm
Regards
Raj Rai
Maybe you are looking for
-
Call to ABAP webservice failed following upgrade to ECC6
Hi all, I have the following interface : LDAP (webservice) ->XI 3.0sp17 -> ECC5 (webservice) sending employees id. it works fine. But, these days, SAP ECC has been upgraded from ECC5 to ECC6 (was 7.0). And now the call to the ECC webservice does not
-
How do I run a thread without its panel.
I have created a vi in my application that I run as a thread. I run the thread by using an invoke node. When I am testing under LabView everything is fine but when I create the executable I have found problems. As I am starting the thread with an inv
-
DPI....does it exist in Ilustrator?
Hello: Someone asked me if they could find the DPI in an .ai document. Now I know that Adobe Illustrator is not dependent on those settings but, by some chance is there a way to check this? The person asking me wants to check when customers send them
-
Hello everyone, I have the problem that I do not know how to install an older version of Flash ActiveX, since trying to install version 9, or even 10.0 .45, the error that comes out is not a recent version, and does not allow you to continue with the
-
Exporting forms out of Adobe into a new provider
Is there something I should know about exporting Adobe forms out of Adobe and into a new forms service provider. I've tried to do it following the other providers instructions and it doesn't work. Are exporting forms out of Adobe not possible, being