on 09-04-2013 10:10 AM
Dear all,
I have an issue regarding converting BUDAT to FISCPER via ABAP code
Field Routine is as below
data: lv_string(7), lv_month(2), lv_year(4), lv_fper(7).
lv_month = SOURCE_FIELDS-BUDAT+4(2).
lv_year = SOURCE_FIELDS-BUDAT+0(4).
concatenate lv_month lv_year into lv_fper SEPARATED BY '.'.
concatenate '0' lv_fper into lv_string.
result = lv_string.
As attachment you can see a test reult of the specific code.
I wonder why the output is bringing irrelevant data.
Thanks.
Hi Eddy,
Can you please close the thread,if you think that your issue is resolved and query has been answered.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please use the function module DATE_TO_PERIOD_CONVERT and use I_PERIV = K4. Concatenate E_GJAHR and E_BUPER without any dot. Store the output to a local variable of type numc 7.
If the result field is of type 0FISCPER, then system will convert the data and display with dot.
If you store RESULT = 2013001, then it will be displayed as 001.2013 automatically if you use info object 0FISCPER.
Hope this helps.
Regards
Sourav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eddy,
FISCPER field is of length 7 without any period operators. It stores in YYYYPPP format. Also you can just use the FM suggested by Martin, Kamal or with the code given by Anshu.
Thanks,
Karan Lokesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eddy ,
You can use available formula : DATE_FISCPER(0CALDAY,'variant') with input as "BUDAT" and also Fiscal year variant.
Also Check if you can use Function Module
DATE_TO_PERIOD_CONVERT with input as "BUDAT" and also Fiscal year variant.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eddy,
At BW side FISCPER stored 7 digit value without any signs.
BUDAT = 11.09.2013 now your FISCPER will be 0092013. remove that signs.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eddy,
Use the FM Martin suggested, or bear in mind that fiscper is stored as yyyyppp (2013009) in BW.
So no dots, and year first.
Regards,
Sjoerd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just remove separated by . because if you are using standard infoobject for fiscper then the output length will automatically will be taken care.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You need to bring the budat into the format yyyyppp no dots required.
You might just want to use the FM UMC_CALDAY_TO_FISCPER to convert it into fiscalyear period
hope it helps
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.