cancel
Showing results for 
Search instead for 
Did you mean: 

BSP or something to Subscribe myself fot the XI Alert System

Former Member
0 Kudos

Hi,

i have a Question. Is it possible to code a BSP or something that can do the following:

I have configured the ALRTCATDEF for XI Alerts in Message Processing. There is the Button: Fixed Recipients

I want to open an Internet Explorer Window and Open a BSP or something on the XI Machine http://XXXX:8000/sap/bc/bsp/sap/Z_subscribeXIAlters

or so...

When i open the page i want that there are two checkboxes

Subscribe and unsubscribe

When i click on Subscribe i want that the system put my userid in the table under: Fixed Recipients.. the same for unsubscribe but the other way...

is this easy to implement?

Thanks for your help.

Regards

Bjoern

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

solved

Former Member
0 Kudos

Sorry bjoern,

maybe I am missing something in your requirements, but can't you use the standard functionality for [User Subscription|http://help.sap.com/saphelp_nwpi71/helpdata/en/92/5e073c8e56f658e10000000a114084/frameset.htm] for alerts?

Kind Regards,

Sergio

Former Member
0 Kudos

Hello Sergio

Thanks for your Feedback. But i want to create this on my own.. because i want to learn while i do this

So can anybody help me with my question above?

Thanks

Bjoern

Former Member
0 Kudos

Can nobody help here?

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>is this easy to implement?

one day max I'd say with BSP

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hello Michal (you old XI Guru )

Thanks for the replay.

Is there any tut out there or something that tells me how to handle this situation?

I know the SE80 and how to create a simple BSP.. but i have no deeper knowledge.

Can you or sembody help here?

//EDIT: What i forgot.. It is equal if it is a BSP or any other thing.. i only want to open it in the Internet Explorer

Regards

Bjoern

Edited by: bjoern bayerschmidt on Mar 3, 2009 12:07 PM

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I'd go for a batch inputs:

a) create a batch input for inserting the user

b) and one for deliting the user

then make a FM from those and the only input would be username

I believe this would work easily and be quick to implement

(just FM call from BSP)

Regards,

Michal Krawczyk

Former Member
0 Kudos

Thanks,

but i never worked with Batch Input.. i am reltive new in SAP Basis Administration

So can you help here?

And what i have to write in the BSP Application?

Former Member
0 Kudos

OK! Now i am a step forward...

i created a Batch Input with SHDB

it looks so:

1 T ALRTCATDEF BS AA X F

2 RSALERTCATDEF 0100 X

3 BDC_OKCODE =ALERT_REC

4 BDC_SUBSCR RSALERTCATDEF 0110SUB

5 BDC_CURSOR SALRTSCATV-DESCR

6 BDC_SUBSCR RSALERTCATDEF 0115SUB

7 SAPLSALERT_TABMAIN 0500 X

8 BDC_CURSOR SALRTVCATU-CATEGORY

9 BDC_OKCODE =AEND

10 SAPLSALERT_TABMAIN 0500 X

11 BDC_CURSOR SALRTVCATU-CATEGORY

12 BDC_OKCODE =NEWL

13 SAPLSALERT_TABMAIN 0500 X

14 BDC_CURSOR SALRTVCATU-UNAME(01)

15 BDC_OKCODE /00

16 SALRTVCATU-UNAME(01) bayerscb

17 SAPLSALERT_TABMAIN 0500 X

18 BDC_CURSOR SALRTVCATU-UNAME(02)

19 BDC_OKCODE =SAVE

20 SAPLSTRD 0300 X

21 BDC_CURSOR KO008-TRKORR

22 BDC_OKCODE =LOCK

23 KO008-TRKORR XIIK900112

24 SAPLSALERT_TABMAIN 0500 X

25 BDC_CURSOR SALRTVCATU-UNAME(02)

26 BDC_OKCODE =BACK

27 SAPLSALERT_TABMAIN 0500 X

28 BDC_CURSOR SALRTVCATU-UNAME(02)

29 BDC_OKCODE =BACK

30 RSALERTCATDEF 0100 X

31 BDC_OKCODE =BACK

32 BDC_SUBSCR RSALERTCATDEF 0110SUB

33 BDC_CURSOR SALRTSCATV-DESCR

34 BDC_SUBSCR RSALERTCATDEF 0115SUB

I named it Z_SUBSCRIBE

I created then a Function Group in SE80.

After that i generated from the Batch Input a Function Module directly from SHDB: Create Function Module i called it also Z_SUBSCRIBE

Now the Function Module looks so:


FUNCTION Z_SUBSCRIBE.
*"--------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'
*"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'N'
*"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'
*"     VALUE(GROUP) LIKE  APQI-GROUPID OPTIONAL
*"     VALUE(USER) LIKE  APQI-USERID OPTIONAL
*"     VALUE(KEEP) LIKE  APQI-QERASE OPTIONAL
*"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE OPTIONAL
*"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'
*"     VALUE(UNAME_01_001) LIKE  BDCDATA-FVAL DEFAULT 'bayerscb'
*"     VALUE(TRKORR_002) LIKE  BDCDATA-FVAL DEFAULT 'XIIK900112'
*"  EXPORTING
*"     VALUE(SUBRC) LIKE  SYST-SUBRC
*"  TABLES
*"      MESSTAB STRUCTURE  BDCMSGCOLL OPTIONAL
*"--------------------------------------------------------------------

subrc = 0.

perform bdc_nodata      using NODATA.

perform open_group      using GROUP USER KEEP HOLDDATE CTU.

perform bdc_dynpro      using 'RSALERTCATDEF' '0100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ALERT_REC'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTSCATV-DESCR'.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-CATEGORY'.
perform bdc_field       using 'BDC_OKCODE'
                              '=AEND'.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-CATEGORY'.
perform bdc_field       using 'BDC_OKCODE'
                              '=NEWL'.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-UNAME(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'SALRTVCATU-UNAME(01)'
                              UNAME_01_001.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-UNAME(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SAVE'.
perform bdc_dynpro      using 'SAPLSTRD' '0300'.
perform bdc_field       using 'BDC_CURSOR'
                              'KO008-TRKORR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=LOCK'.
perform bdc_field       using 'KO008-TRKORR'
                              TRKORR_002.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-UNAME(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_dynpro      using 'SAPLSALERT_TABMAIN' '0500'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTVCATU-UNAME(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_dynpro      using 'RSALERTCATDEF' '0100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'SALRTSCATV-DESCR'.
perform bdc_transaction tables messtab
using                         'ALRTCATDEF'
                              CTU
                              MODE
                              UPDATE.
if sy-subrc <> 0.
  subrc = sy-subrc.
  exit.
endif.

perform close_group using     CTU.





ENDFUNCTION.
INCLUDE BDCRECXY .

I created then in the SE80 a BSP Application with a HTM File in it.

In TAB Event Handler i call the function:

CALL FUNCTION 'Z_SUBSCRIBE' DESTINATION 'NONE'.

So.. when i now delete my name in the ALRTCATDEF and run the Batch Input it inserts my name again. But when i open the HTM File in the IE with Call Function.. nothing happens.. ?! Why?

Thanks for your help

Edited by: bjoern bayerschmidt on Mar 3, 2009 2:13 PM

Former Member
0 Kudos

OK.. a new step forward..

The function Module is working fine..

When i go to SE37 and call the FM Z_SUBSCRIBE the following Screen appears:

http://img16.imageshack.us/my.php?image=xii1.jpg

Directlink: http://img16.imageshack.us/img16/4831/xii1.jpg

I can then write a name in the line: UNAME_01_001

and run the FM.. that works great.... so what i have to do now that i have a line in the BSP where i can write a name in it and send it... ?

Thanks

Bjoern

Edited by: bjoern bayerschmidt on Mar 9, 2009 3:02 PM