cancel
Showing results for 
Search instead for 
Did you mean: 

Standard template created by user A, printable by user B?

Former Member
0 Kudos

Hello

I wonder how a standard template created by user A can be printed out by another user B that is not allowed to create but to use standard templates. Normally one can print out shopping carts (standard form = BBP_SC) via the check status function. But there the user only sees the shopping carts, standard or personal template created by himself.

Did somebody already came across this problem and found a way to solve it? Or does someone have a good tip for me how this could be achieved?

Thanks for any helpful hints!

Kind regards,

Renaud

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello everybody

I already asked for some help quite long ago and wasn't able to solve it until now. However, the requirement becomes more important now to us. So I'm asking again hopeing to find someone able to help me out.

Tried with BAdI BBP_WF_LIST (method BBP_WF_LIST) but there all I can do is to set <b>additional</b> filters, but not enhance the resulting list with standard templates not belonging to the user who created it.

As far as I could investigate, the BAdI is called by function module BBP_PD_SC_LISTSEL. Somewhere after the BAdI call the function module kicks out again lines added to E_PDLIST by BAdI coding.

Thanks in advance for helpful hints!

Kind regards,

Renaud

Former Member
0 Kudos

Hello everone

Was able to solve it myself. Had to do some modifications. Now all users additionally see all standard templates from other users in the check status transaction. They can view and print out (pdf) such standard templates except changing or deleting it. Of course own standard templates can still be changed / deleted!

<b>Function module BBP_PDH_SEARCH_SC</b>

Changed line 358 from

lv_created_by1 = sy-uname.

to

CLEAR lv_created_by1.

Inserted this coding beginning with line 389:

LOOP AT lt_sc_add_list.
 IF lt_sc_add_list-created_by <> sy-uname AND
   lt_sc_add_list-changed_by <> sy-uname.
   lt_sc_add_list-changeable = ''.
   lt_sc_add_list-erasable = ''.
   MODIFY lt_sc_add_list.
 ENDIF.
ENDLOOP.

<b>Include LBBP_SC_UI_ITSFB4</b>

Inserted this coding beginning with line 189:

IF gs_sc-header-subtype = 'ST' AND
   gs_sc-header-changed_by <> sy-uname AND
   gs_sc-header-created_by <> sy-uname.
   screen-input     = gc_off.
   screen-output    = gc_off.
   screen-invisible = gc_on.
ENDIF.

<b>Function module BBP_PDH_SEARCH_SC_SUBLIST</b>

Inserted this coding to beginning with line 201:

IF ls_header-subtype = 'ST' AND
   ls_header-created_by <> sy-uname AND
   ls_header-changed_by <> sy-uname.
   lt_sc_sublist-flag_delete = c_off.
ENDIF.

Hope this helps someone in future.

Kind regards,

Renaud

Former Member
0 Kudos

Hi Renaud,

A Layman method that can only I tell.

Let the user B make a dummy shopping cart with this template.

Then he can print in 'check status'.

BR

Dinesh