cancel
Showing results for 
Search instead for 
Did you mean: 

marked cells in DP macros

daniel_mueller
Discoverer
0 Kudos

Hi experts,

i wanted to develop a macro which calculates the value of the specific (marked) cell. Or more exact, the marked (clicked) cell of a planning map. The standard macro functions ROW_MARKED and COLUMN_MARKED work fine if a user selects a full row or a full column.

But the macro should work for exactly one selected cell. I found out, that standard macro functions like ROW_MARKED are based on the standard function /SAPAPO/MARKED_ELEMENTS but there is no standard function like e.g. "marked_cell".

I only have basic knowledge of abap, so without handy tips its too difficult for me to develop a own MARKED_CELL function. Probably there is an other way to build up macros which work on cell, maybe with a combination of standard macro functions I don't know. But i think there is no way to avoid abap coding, isn't it?

Thanks for trouble in advance!

Regards,

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

Hi Daniel,

I've found some replies from our developer, that your required functionality is not provided in standard.

There's no macro functiion could acheive this.

I think the only way is modifying the system by yourself, but it seems not very easy. Please refer to the below reply from our developer:

"

In include /SAPAPO/SDP_CB_SDP, FORM grid_context_menu_selected is

called when you right mouseclick in a cell.

In this form you may extend the CASE by an own fcode and and do similiar

things like in the show detail function:

  • Show detail information

WHEN 'MAGC_SHOW_DETAIL'.

CASE lv_grid.

WHEN 1.

PERFORM snp_detail_show USING gs_actview-pareaid

p_col_id

p_row_id

gs_actview-agc_grid1

gs_actview-agc_cell1."#611897MH

Further you have to add your own fcode to the context menu in:

FORM grid_context_menu_requested

CALL FUNCTION '/SAPAPO/PI_SDP_GRID_CTXMENU'

"

Hope this helps.

Best Regards,

Ada

daniel_mueller
Discoverer
0 Kudos

Hi Ada,

thanks a lot for your prompt answer and your efforts.

I feared that there is no standard function. I think its not profitable spending much time on developing this function on my own. But as I worked with the macro workbench, I found out that the function statement "marked_column ( specific_row )" (-> associated with the specific row I want do calculate) achieves the same. Click on the top of the column for marking is surley not as userfriendly as click on a cell. But it works!

Many Thanks for your help

I went through the whole Internet without finding a solution and I hope your answer will help a lot of other people who are confronted with this problem.

Greetings

Daniel

Former Member
0 Kudos

Hi Daniel, Its kind of very old but would you like to share this Marked Column (specific row) thing. I can't seem to find it. My need was ditto

Thanks

BS

Answers (1)

Answers (1)

daniel_mueller
Discoverer
0 Kudos

Very helpful answer