this program is pass parameter GL account to transaction FBL3N report,
REPORT ZTGH_TEST.
TYPEs : begin of ty_saknr,
saknr TYPE saknr,
END OF ty_saknr.
"1. define structure for glaccount. this statement will create structure for saknr
data : t_saknr TYPE TABLE OF ty_saknr WITH HEADER LINE,
r_saknr TYPE RANGE OF saknr,
lr_saknr LIKE LINE OF r_saknr.
"2. define ranges, ranges line, for saknr structure.
SELECT saknr UP TO 10 ROWS from skat into TABLE t_saknr.
"3. get data saknr from database
LOOP AT t_saknr.
lr_saknr-low = t_saknr.
lr_saknr-sign = 'I'.
lr_saknr-option = 'EQ'.
APPEND lr_saknr to r_saknr.
ENDLOOP.
"4. insert value in t_saknr to ranges r_saknr
submit rfitemgl with SAK in r_saknr "get parameter-id for saknr (glaccount)
with BUK = '1000'."get paramater-id for companycode (bukrs)
"5.call program fbl3n (rfitemgl) with paraneter.
How to get program name of a transaction
1. go to tcode FBL3N.
2. go to system --> status. look at in "program" field.
how t0 get parameter-ID
1. put your cursor in select options GL account
2. press F1.
3. click technical setting
Thursday, July 2, 2009
Monday, June 29, 2009
WRBTR value or external value
Amount that SAP stored in Database, is not in real value.
Example : you have 1000 JPY.
this amount will convert to 10 in SAP database.
how do i know database value of amount
if you have an amount, for example 1000 in your variable, what is database value ?
you can use function BAPI_CURRENCY_CONV_TO_INTERNAL to get database value or internal value of an amount, (in this case, this function will return 10).
how do i know real value of amount ?
if you select an amount from database, and you get 40, what is external value or real value ?
You can use : WRITE var_amount TO CURRENCY currency
this will format the result with user setting (decimal places and thousand separator)
example :
LV_AMOUNT = 40.
WRITE LV_AMOUNT TO CURRENCY 'JPY'.
the output will be 4000
Or you can call function
BAPI_CURRENCY_CONV_TO_EXTERNAL
You will get real value in decimal data type.
good luck... :)
Example : you have 1000 JPY.
this amount will convert to 10 in SAP database.
how do i know database value of amount
if you have an amount, for example 1000 in your variable, what is database value ?
you can use function BAPI_CURRENCY_CONV_TO_INTERNAL to get database value or internal value of an amount, (in this case, this function will return 10).
how do i know real value of amount ?
if you select an amount from database, and you get 40, what is external value or real value ?
You can use : WRITE var_amount TO CURRENCY currency
this will format the result with user setting (decimal places and thousand separator)
example :
LV_AMOUNT = 40.
WRITE LV_AMOUNT TO CURRENCY 'JPY'.
the output will be 4000
Or you can call function
BAPI_CURRENCY_CONV_TO_EXTERNAL
You will get real value in decimal data type.
good luck... :)
Thursday, June 25, 2009
ABAP spell amount
How to spell amount in ABAP
SAP have this function :
SPELL_AMOUNT
with input parameter :
1. amount - amount that you want to spell
2. CURRENCY - your amount currency
3. FILLER - replacing space with this filler
4. LANGUAGE - what language do you want to spell your amount
good luck
SAP have this function :
SPELL_AMOUNT
with input parameter :
1. amount - amount that you want to spell
2. CURRENCY - your amount currency
3. FILLER - replacing space with this filler
4. LANGUAGE - what language do you want to spell your amount
good luck
Subscribe to:
Posts (Atom)