cancel
Showing results for 
Search instead for 
Did you mean: 

Planning function type Exit in SEM-BPS?

Former Member
0 Kudos

Dear Experts,

I have to write a planning function type <u>Exit</u> in SEM-BPS. The function should copy some quotation price values from a quotation infoprovider to another infocube. I have made a Multi area in SEM-BPS to perform the copy. There is a characteristic '_AREA_____' (Planning Area) in SEM-BPS which is automatically added to all Multi area to distinguish the infoproviders.

How can I reach this '_AREA_____' object in my Exit?

I should copy from Area1 to Area2 but there is not such an infoobject!

I would be appreciated if you have some source code of Exits which copies values between different areas of BPS because I am quite new in this

Thanks in Advance,

Dezso

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at thsi:

Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

In your exit function you have a parameter XTH_DATA. This parameter contains a hashed table. The structure of the table consists of S_CHAS that contains all characteristics and S_KYFS that contains all key figures. In a Multi area there is a field called AREA___ that you can check. The basic coding in your function module should therefore look like.

DATA: l_s_data TYPE /1SEM/_YS_DATA<...>

LOOP AT xth_data into l_s_data.

IF l_s_data-s_chas-_area___ = 'CUBE1'.

l_s_data-s_chas-_area___ = 'CUBE2'.

insert l_s_data into xth_data.

IF sy-subrc <> 0.

MODIFY xth_data FROM l_s_data.

ENDIF.

ENDIF.

ENDLOOP.

Note that this does not delete existing records. The type of the structure l_s_data depends on the client and name of the multi area.

Best regards

Dirk

Former Member
0 Kudos

Small addition:

If clients in development and productive system are different, then declarations like

DATA: l_s_data TYPE /1SEM/_YS_DATA<...> and

l_s_data-s_chas-_area___ = 'CUBE2' are not applicable.

You should use something like

field-symbols: <ls_data> type any,

<value> type any.

...

assign component 'S_CHAS-_AREA____' of structure l_s_data to <value>.