cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert fiscal period into fiscal quarter

Former Member
0 Kudos

Hi Guys,

How to convert fiscal period into fiscal quarter in update routine level,is there any function module.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use the following code in the start routine of update rules:

Here ZFIQUART is Z IO to represent Fiscal Quarter.

And you need to make sure that the Communication Structire has ZFIQUART field irrespective of the transfer rule mapping for it.

DATA: FQ TYPE N.

LOOP AT DATA_PACKAGE.

FQ = 0.

IF DATA_PACKAGE-FISCPER3 LE 3.

FQ = 1.

ELSEIF DATA_PACKAGE-FISCPER3 LE 6.

FQ = 2.

ELSEIF DATA_PACKAGE-FISCPER3 LE 9.

FQ = 3.

ELSEIF DATA_PACKAGE-FISCPER3 LE 12.

FQ = 4.

ENDIF.

CONCATENATE DATA_PACKAGE-FISCPER(4) FQ INTO DATA_PACKAGE-/BIC/ZFIQUART.

MODIFY DATA_PACKAGE.

ENDLOOP.

With rgds,

Anil Kumar Sharma .P

Answers (2)

Answers (2)

former_member205352
Active Contributor
0 Kudos

U want to find which quarter for a particular fiscal period then u can use the following pseudocode.

Pseudocode :

if fiscal perid between (1st quarter range)

then quarter = 1

else if fiscal perid between (2nd quarter range)

then quarter = 2

else if fiscal perido between (3rd quarter range)

then quarter = 3.

endif.

Hope this helps.

Former Member
0 Kudos

Dear Abdul,

I guess that "Fiscal Quarter" is not an SAP standard InfoObject but a customer defined one. In this case the automatic derivation cannot be used. Instead, I suggest to use a formula or a routine as source for "Fiscal Quarter".

The following links explain when an automatic time conversion can be used:

http://help.sap.com/saphelp_nw04/helpdata/en/af/ad259f84cf11d5b2fe0050da4c74dc/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/65/4bdab4239011d5b2e30050da4c74dc/frameset.htm

Greetings,

Stefan