on 06-12-2008 7:38 PM
Hi ABAP Experts,
I'm changing the script form,Im not able to get the text symbol to display the value.
Please help me to complete the issue.
the piece of code in the main window is
500
*----
** Text elements for account statement **
*----
510
*- Header text for account statement -
Account statement from &RF140-DATU1& to &RF140-DATU2&
*- you can enter your own text into this window, either in addition to
*- or instead of the standard text. You can then change this text -
*- To do so, in the line with the INCLUDE, you must replace / with /:-**
INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE &RF140-TDSPRAS&
511
*- Header text for open item list -
Open item list as of &RF140-STIDA&
*- you can enter your own text into this window, either in addition to
*- or instead of the standard text. You can then change this text -
*- To do so, in the line with the INCLUDE, you must replace / with /:-**
INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE &RF140-TDSPRAS&
here
Account statement from &RF140-DATU1& to &RF140-DATU2&*
is not displaying in the print..
i even debuged but &RF140-DATU1& to &RF140-DATU2&* shows no values..
please help me to resolve it.
HI Sujamol Augustine ,
Thanks for ur reply,as u suggested .i debugged.
i get warning like " TEXT COMMAND&RF140-WRSHB& IS NOT DEFINED
I HOPE ITS ABOUT DEFINING THE STRUCTURE RF140.
SO KINDLY TELL ME HOW TO DEFINE THE STRUCTURE. RF140
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
keep a breakpoint at the write_form comand for text element 510.
debug and check the value of RF140-TDNAME and &RF140-TDSPRAS&,
just before it execute this write_form.
maybe tis blank...if there is a value for these parameters,
then execute function module read_text in another window,
and see whether any text exist for RF140-TDNAME, BKORM, FIKO and the language in &RF140-TDSPRAS&
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
what are 500, 510 in ur code?
are they data elements?
if so?... make sure that u are passing &RF140-DATU1& to &RF140-DATU2& fields in 510 data element, otherwise they dont get populate.
check the write_form Fm for correct data elements.
Regards
Syed A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Syed,
Thank you for the reply.510 ,511 are the data elements,when i add the "Account statement from &RF140-DATU1& to &RF140-DATU2&"
I get like "Account statement from to".
but the values for &RF140-DATU1& and &RF140-DATU2& is not getting displayed
and more over my print out also doesnt have the values from the date specified in the request for print i.e.,the from date &RF140-DATU1& .
As u said I understand I need to activate the data element ..
How do I have to do.
The driver program is RFKORD10.
I have a subroutine pool ZFI_ACCOUNT_STATEMENT.which goes like
*&---------------------------------------------------------------------*
*& Subroutine Pool ZFI_ACCOUNT_STATEMENT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
program zfi_account_statement.
*&---------------------------------------------------------------------*
*& Form get_data1
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->IN_PAR text
* -->OUT_PAR text
*----------------------------------------------------------------------*
form get_data tables in_par structure itcsy
out_par structure itcsy.
data : belnr type rf140-belegnum.
data : blart(15) type c.
data : zuonr type bseg-zuonr.
data : rf140 type bsid.
data : loading type vbrp-aubel.
data : quantity(20) type c.
data : dispatch type vbkd-bstkd.
data : fkimg type vbrp-fkimg.
data : vrkme type vbrp-matnr.
data : am type string.
data : amount type string.
read table in_par index 1.
belnr = in_par-value.
read table in_par index 2.
blart = in_par-value.
read table in_par index 3. "&RF140-WRSHB&
am = in_par-value.
* AMOUNT = AM.
*CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
* EXPORTING
* string = AM
** DECIMAL_SEPARATOR = '.'
*** THOUSANDS_SEPARATOR = ','
** WAERS = ' '
* IMPORTING
* BETRG = AMOUNT
* EXCEPTIONS
* CONVERT_ERROR = 1
* OTHERS = 2
* .
*IF sy-subrc <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = am
importing
output = amount.
constants: c_pgmvariable(21) value '(RFKORD10)BSID'.
field-symbols: <fc> type any.
assign (c_pgmvariable) to <fc>.
rf140 = <fc>.
if blart eq 'FT'.
* SELECT SINGLE ZUONR FROM BSEG INTO ZUONR WHERE BUKRS EQ '3599' AND
*BELNR EQ BELNR.
zuonr = rf140-zuonr.
concatenate 'INV:' zuonr into zuonr.
out_par-name = 'Y'.
out_par-value = zuonr.
modify out_par index 1 transporting value.
select fkimg matnr aubel into (fkimg , vrkme, loading) from vbrp
where vbeln eq rf140-zuonr.
endselect.
out_par-name = 'LOADING'.
out_par-value = loading.
modify out_par index 3 transporting value.
quantity = fkimg.
* CONCATENATE QUANTITY VRKME INTO QUANTITY SEPARATED BY SPACE.
shift quantity left deleting leading space.
out_par-name = 'QUANTITY'.
out_par-value = quantity.
modify out_par index 4 transporting value.
out_par-name = 'UNIT'.
out_par-value = vrkme.
modify out_par index 5 transporting value.
select bstkd from vbkd into dispatch where vbeln eq loading.
endselect.
out_par-name = 'DISPATCH'.
out_par-value = dispatch.
modify out_par index 2 transporting value.
else.
out_par-name = 'Y'.
out_par-value = belnr.
modify out_par index 1 transporting value.
endif.
* " - - CREDIT
data : pos type i.
pos = 0.
find '-' in amount match count pos.
if pos ne 0.
out_par-name = 'CREDIT'.
replace '-' in amount with '' .
out_par-value = amount.
modify out_par index 7 transporting value.
else.
out_par-name = 'DEBIT'.
out_par-value = amount.
modify out_par index 6 transporting value.
endif.
endform. "get_data_com
*&---------------------------------------------------------------------*
*& Form get_TOTAL
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->IN_PAR text
* -->OUT_PAR text
*----------------------------------------------------------------------*
form get_total tables in_par structure itcsy
out_par structure itcsy.
data : amount type bseg-dmbtr.
statics credit type bseg-dmbtr.
statics debit type bseg-dmbtr.
statics c_credit(20) type c.
statics c_debit(20) type c.
data : pos type i.
data : c_total(20) type c.
data : c_total1(20) type c.
data : balance type bseg-dmbtr.
statics : cl_credit type bseg-dmbtr.
statics : cl_debit type bseg-dmbtr.
data : cl_amount(20) type c.
read table in_par index 1.
if in_par-name = 'K'.
credit = 0.
debit = 0.
c_debit = 0.
c_credit = 0.
cl_credit = 0.
cl_debit = 0.
elseif in_par-name = 'T'.
read table in_par index 2.
if in_par-value is not initial.
c_total = in_par-value.
amount = c_total.
credit = abs( credit ) + amount.
write credit to c_credit no-grouping currency 'INR' right-justified.
replace '-' in c_credit with ''.
else.
read table in_par index 3.
c_total = in_par-value.
amount = c_total.
debit = debit + amount.
write debit to c_debit no-grouping currency 'INR' right-justified.
endif.
out_par-name = 'c_credit'.
out_par-value = c_credit.
modify out_par index 1 transporting value.
out_par-name = 'c_debit'.
out_par-value = c_debit.
modify out_par index 2 transporting value.
else.
c_total = in_par-value.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = c_total
importing
output = c_total.
replace all occurrences of ',' in c_total with '' .
amount = c_total.
* total = total + amount.
* WRITE TOTAL TO C_TOTAL NO-GROUPING CURRENCY 'INR'.
*
* out_par-name = 'TOTAL'.
* out_par-value = C_total.
* MODIFY out_par INDEX 1 TRANSPORTING value.
find '-' in c_total match count pos.
if pos ne 0.
credit = credit + amount.
write credit to c_credit no-grouping currency 'INR' right-justified.
replace '-' in c_credit with ''.
else.
debit = debit + amount.
write debit to c_debit no-grouping currency 'INR' right-justified.
replace '-' in c_debit with ''.
endif.
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = c_credit
importing
output = c_credit
.
out_par-name = 'C_CREDIT'.
out_par-value = c_credit.
modify out_par index 1 transporting value.
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = c_debit
importing
output = c_debit
.
out_par-name = 'C_DEBIT'.
out_par-value = c_debit.
modify out_par index 2 transporting value.
endif.
balance = abs( credit ) - abs( debit ).
if abs( credit ) > abs( debit ).
cl_credit = abs( balance ).
cl_debit = '0'.
else.
cl_debit = abs( balance ).
cl_credit = '0'.
endif.
if cl_credit ne '0.00'.
cl_amount = cl_credit.
else.
cl_amount = ' '.
endif.
out_par-name = 'C_CREDIT'.
out_par-value = cl_amount.
modify out_par index 3 transporting value.
if cl_debit ne '0.00'.
cl_amount = cl_debit.
else.
cl_amount = ' '.
endif.
out_par-name = 'CL_DEBIT'.
out_par-value = cl_amount.
modify out_par index 4 transporting value.
endform. "get_TOTAL
form get_opening tables in_par structure itcsy
out_par structure itcsy.
data : am(20) type c.
read table in_par index 1. "&RF140-WRSHB&
am = in_par-value.
out_par-name = 'OP_CREDIT'.
out_par-value = am.
modify out_par index 1 transporting value.
read table in_par index 2. "&RF140-WRSHB&
am = in_par-value.
out_par-name = 'OP_DEBIT'.
out_par-value = am.
modify out_par index 2 transporting value.
endform.
+and my form code is like+
500
*---------------------------------------------------------------------*
* Text elements for account statement *
*---------------------------------------------------------------------*
510
*- Header text for account statement ---------------------------------*
Account statement from &RF140-DATU1& to &RF140-DATU2&
*- you can enter your own text into this window, either in addition to
*- or instead of the standard text. You can then change this text ----*
*- To do so, in the line with the INCLUDE, you must replace /* with /:-*
INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE &RF140-TDSPRAS&
511
*- Header text for open item list ------------------------------------*
Open item list as of &RF140-STIDA&
*- you can enter your own text into this window, either in addition to
*- or instead of the standard text. You can then change this text ----*
*- To do so, in the line with the INCLUDE, you must replace /* with /:-*
INCLUDE &RF140-TDNAME& OBJECT BKORM ID FIKO LANGUAGE &RF140-TDSPRAS&
511
*- Account statement line item heading --------------------------------*
&ULINE(105)&
Doc.Date Doc.Number Transaction Qty Mat Schedule No Order No &SPACE(25)& DEBIT &SPACE(15)& CREDIT
<K>Date,,Number,,action</>
&ULINE(105)&
521
*- Heading for trans. w/out sp.G/L indicators (item sorting method 2)-*
Transactions without special G/L indicators
522
*- Heading for trans. with sp.G/L indicators (item sorting method 2)-*
&T074T-LTEXT&
523
*- Heading for open item list of line items --------------------------*
&ULINE(105)&
Doc.Date Doc.Number Transaction Qty Mat Schedule No Order No &SPACE(25)& DEBIT &SPACE(15)& CREDIT
<K>Number,,Date,,action</>
&ULINE(105)&
530
*- Line items Customer open items ---------------------------------*
DEFINE &X& = &RF140-BELEGNUM&
DEFINE &Y& = ' '
DEFINE &DISPATCH& = ' '
DEFINE &LOADING& = ' '
DEFINE &QUANTITY& = ' '
DEFINE &UNIT& = ' '
DEFINE &CREDIT& = ' '
DEFINE &DEBIT& = ' '
PERFORM GET_DATA IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &X&
USING &T003T-BLART&
USING &RF140-WRSHB&
CHANGING &Y&
CHANGING &DISPATCH&
CHANGING &LOADING&
CHANGING &QUANTITY&
CHANGING &UNIT&
CHANGING &DEBIT&
CHANGING &CREDIT&
ENDPERFORM
&BSID-BLDAT& &Y(15)& &T003T-BLART& &QUANTITY& &UNIT& &DISPATCH& &LOADING& &DEBIT& &CREDIT&
&RF140-WRSHB&,,&T003T-BLART(3)&
PERFORM GET_TOTAL IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &RF140-WRSHB&
CHANGING &C_CREDIT&
CHANGING &C_DEBIT&
CHANGING &CL_CREDIT&
CHANGING &CL_DEBIT&
ENDPERFORM
531
*- Line items Cleared customer items ------------------------------*
DEFINE &X& = &RF140-BELEGNUM&
DEFINE &Y& = ' '
DEFINE &DISPATCH& = ' '
DEFINE &LOADING& = ' '
DEFINE &QUANTITY& = ' '
DEFINE &UNIT& = ' '
DEFINE &CREDIT& = ' '
DEFINE &DEBIT& = ' '
PERFORM GET_DATA IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &X&
USING &T003T-BLART&
USING &RF140-WRSHB&
CHANGING &Y&
CHANGING &DISPATCH&
CHANGING &LOADING&
CHANGING &QUANTITY&
CHANGING &UNIT&
CHANGING &DEBIT&
CHANGING &CREDIT&
ENDPERFORM
&BSID-BLDAT& &Y(15)& &T003T-BLART& &QUANTITY& &UNIT& &DISPATCH& &LOADING& &DEBIT& &CREDIT&
PERFORM GET_TOTAL IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &RF140-WRSHB&
CHANGING &C_CREDIT&
CHANGING &C_DEBIT&
CHANGING &CL_CREDIT&
CHANGING &CL_DEBIT&
ENDPERFORM
532
*- Line items Vendor open items -----------------------------------*
DEFINE &X& = &RF140-BELEGNUM&
DEFINE &Y& = ' '
DEFINE &DISPATCH& = ' '
DEFINE &LOADING& = ' '
DEFINE &QUANTITY& = ' '
DEFINE &UNIT& = ' '
DEFINE &CREDIT& = ' '
DEFINE &DEBIT& = ' '
PERFORM GET_DATA IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &X&
USING &T003T-BLART&
USING &RF140-WRSHB&
CHANGING &Y&
CHANGING &DISPATCH&
CHANGING &LOADING&
CHANGING &QUANTITY&
CHANGING &UNIT&
CHANGING &DEBIT&
CHANGING &CREDIT&
ENDPERFORM
&BSID-BLDAT& &Y(15)& &T003T-BLART& &QUANTITY& &UNIT& &DISPATCH& &LOADING& &DEBIT& &CREDIT&
PERFORM GET_TOTAL IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &RF140-WRSHB&
CHANGING &C_CREDIT&
CHANGING &C_DEBIT&
CHANGING &CL_CREDIT&
CHANGING &CL_DEBIT&
ENDPERFORM
533
*- Line items Cleared vendor items --------------------------------*
DEFINE &X& = &RF140-BELEGNUM&
DEFINE &Y& = ' '
DEFINE &DISPATCH& = ' '
DEFINE &LOADING& = ' '
DEFINE &QUANTITY& = ' '
DEFINE &UNIT& = ' '
DEFINE &CREDIT& = ' '
DEFINE &DEBIT& = ' '
PERFORM GET_DATA IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &X&
USING &T003T-BLART&
USING &RF140-WRSHB&
CHANGING &Y&
CHANGING &DISPATCH&
CHANGING &LOADING&
CHANGING &QUANTITY&
CHANGING &UNIT&
CHANGING &DEBIT&
CHANGING &CREDIT&
ENDPERFORM
&BSID-BLDAT& &Y(15)& &T003T-BLART& &QUANTITY& &UNIT& &DISPATCH& &LOADING& &DEBIT& &CREDIT&
PERFORM GET_TOTAL IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &RF140-WRSHB&
CHANGING &C_CREDIT&
CHANGING &C_DEBIT&
CHANGING &CL_CREDIT&
CHANGING &CL_DEBIT&
ENDPERFORM
534
*- No postings in account statement period ---------------------------*
No postings in account statement period.
535
*- No open items on key date -----------------------------------------*
No open items on key date&RF140-STIDA&
540
*- Balance carried forward 1st line ----------------------------------*
BALANCE CARRIED FORWARD AS ON &RF140-DATU1& : &RF140-SALDO&
PERFORM GET_TOTAL IN PROGRAM ZFI_ACCOUNT_STATEMENT
USING &RF140-SALDO&
CHANGING &C_CREDIT&
CHANGING &C_DEBIT&
CHANGING &CL_CREDIT&
CHANGING &CL_DEBIT&
ENDPERFORM
541
*- Bal. carried forward Continuation lines with several currencies--*
&RF140-SALDO&
542
*- Balance carried forward with zero balance -------------------------*
BALANCE CARRIED FORWARD AS ON &RF140-DATU1& : &RF140-SALDO&
543
*- Blank line --------------------------------------------------------*
544
*- Subtotal first line -----------------------------------------------*
Subtotal &RF140-SALDO&
545
*- Subtotal continuation lines with several currencies ---------------*
&RF140-SALDO&
550
*- Final balance 1st line -------------------------------------------*
&ULINE(105)&
Final balance&RF140-DATU2&: &RF140-SALDO&
551
*- Final balance Continuation lines with several currencies --------*
&RF140-SALDO&
552
*- Final balance with zero balance -----------------------------------*
&ULINE(105)&
Final balance &RF140-DATU2&: &RF140-SALDO&
553
*- Balance of open items list 1st line ------------------------------*
&ULINE(105)&
Balance on key date &RF140-STIDA&: &RF140-SALDO&
554
*- Bal. of open items list Continuation lines with several currencies*
&RF140-SALDO&
555
*- Balance of open items list with zero balance ----------------------*
&ULINE(105)&
Balance on key date &RF140-STIDA&: &RF140-SALDO&
560
*- Heading for noted items -------------------------------------------*
Open noted items:
&ULINE(105)&
561
*- Noted items 1st line-----------------------------------------------*
&ULINE(105)&
Noted items &RF140-DATU2&: &RF140-SALDO&
562
*- Noted items Continuation lines with several currencies ---------*
&RF140-SALDO&
563
*- Noteditemswithzero balance -------------------------------------*
&ULINE(105)&
Noted items&RF140-DATU2&: &RF140-SALDO&
564
*- Noted items Open item list 1st line -----------------------------*
&ULINE(105)&
Noted items on &RF140-STIDA&: &RF140-SALDO&
565
*- Noted items Open item list Cont. lines with several currencies ---
&RF140-SALDO&
566
*- Noted items Open item list with zero balance ---------------------*
&ULINE(105)&
Noted items on &RF140-STIDA&: &RF140-SALDO&
570
*- Due items 1st line ------------------------------------------------*
Due items on&RF140-VSTID&: &RF140-SALDO&
571
*- Due items Continuation lines with several currencies -------------*
&RF140-SALDO&
572
*- Due items with zero balance ---------------------------------------*
Due items on &RF140-VSTID&: &RF140-SALDO&
580
*- Heading Display for centrally processed branches ----------------*
PROTECT
In this account statement, besides your head office, we have also included the following branches:
ENDPROTECT
581
*- Display for branches ----------------------------------------------*
PROTECT
ADDRESS PARAGRAPH AS
TITLE &FIADR-ANRED&
NAME &FIADR-NAME1&, &FIADR-NAME2&, &FIADR-NAME3&, &FIADR-NAME4&
STREET &FIADR-STRAS&
POBOX &FIADR-PFACH& CODE &FIADR-PSTL2&
CITY &FIADR-ORT01&, &FIADR-ORT02&
POSTCODE &FIADR-PSTLZ&
COUNTRY &FIADR-LAND1&
REGION &FIADR-REGIO&
FROMCOUNTRY &FIADR-INLND&
ENDADDRESS
Your account with us &FIADR-KONTO&
Our account with you &FIADR-EIKTO&
ENDPROTECT
590
*- Blank for customer use --------------------------------------------*
so..now how do i active the date fields?
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.