Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use function module CP_SL_ROUTING_SELECTION

former_member652338
Participant
0 Likes
842

Hello,

Can you please help me by giving some examples of using the function module CP_SL_ROUTING_SELECTION.

I came to know that i have to pass the PLAF-PSPEL value in the import parameter of the FM and the FM works. But when i used this and executed, I do not get the output. So please let me know if i am missing any other stuff to be passed to the FM.

I have tried a lot and also searched in the web, but as this FM is very rarely used, I could not find any results.

Hope I find some solution here.

Best Regards,

Tousif

4 REPLIES 4
Read only

Former Member
0 Likes
751

Hi Tousif,

Refer to sample code.

     RCPSL_SS-PLNTY = HEADER-PLNTY.

     RCPSL_SS-PLNNR = HEADER-PLNNR.

     RCPSL_SS-PLNAL = HEADER-PLNAL.

CALL FUNCTION 'CP_SL_ROUTING_SELECTION'

     EXPORTING

          RCPSL     = RCPSL_SS

     IMPORTING

          FLG_ESC   = FLG_ESCAPE

          PLNAL_EXP = HEADER-PLNAL

          PLNNR_EXP = HEADER-PLNNR

          PLNTY_EXP = HEADER-PLNTY

     TABLES

          MESG_EXP  = MESG_TAB.

You could also refer to standard include LCOSDF1S where the FM is used.

Hope this helps

Thanks,

Tooshar Bendale

Read only

0 Likes
751

Hi Tooshar,

My main aim to use this FM itself is to get the values PLNTY, PLNNR and PLNAL. But I see that you are passing them to the header structure in order to execute the FM.

Please let me know if anything else needs to be passed other than the WBS element (PLAF-PSPNR) to this header structure to get those 3 details from FM.

Br,

Tousif

Read only

0 Likes
751

Hi Tousif,

Going ahead when i go through the FM i found that you will need to specify the object (RCPSL-OBJECT)

Below are the values allowed for the object.

0 Direct selection without allocation object

1 Selection via material

2 Selection via equipment

3 Selection via functional location

However it is doing a selection on the table PLKO. The table PLKO contains all the values that you require. (PLNTY, PLNNR and PLNAL) and even it contains PSPNR. So however writing a select query on PLKO will be quite easy rather than going with this FM if you require only these 3 field values.

Let me know if additional info is requied.

Hope this helps.

Thanks,

Tooshar Bendale

Read only

0 Likes
751

Hi Tooshar,

Yes my main requirement is to fetch those 3 values/

I have checked the table PLKO but found that even in this table the key fields are PLNTY, PLNNR and PLNAL. so writting a select on PLKO based on PSPNR of PLAF i think does not give a unique entry from this table.

Let me know if anything else is needed.

Br,

Tousif