cancel
Showing results for 
Search instead for 
Did you mean: 

Tnx. IW22 Change PM Notification - Create external document (URL) posting

Former Member
0 Kudos

Hi:

I am in transaction IW22 i.e. Change PM Notification. There is a 'Services for object' drop down which appears below the enter tick. This appears in online but not in BDC. I have tried it through the transaction SHDB i.e. Transaction Recorder also herein the 'Services for object' does not appear. I need to post entries through 'Create external document (URL)' through the 'Services for object' drop down using BDC / BAPI / etc.

Please advice.

NB.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi NB,

We have similar issue for QM notification and I have used function "SO_OBJECT_INSERT".

I am enclosing my code may be useful for you:

FORM CREATE-URL-ATTACHMENT.

CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'

EXPORTING

REGION = 'B'

IMPORTING

FOLDER_ID = FOLDER_ID

EXCEPTIONS

OTHERS = 1.

CLEAR: LS_OBJCONT, LT_OBJCONT, LT_OBJHEAD.

REFRESH: LT_OBJCONT, LT_OBJHEAD.

CONCATENATE '&KEY&' H-URL INTO LS_OBJCONT.

APPEND LS_OBJCONT TO LT_OBJCONT.

CLEAR: L_OBJ_DATA.

L_OBJ_DATA-OBJSNS = 'O'.

L_OBJ_DATA-OBJLA = SY-LANGU.

L_OBJ_DATA-OBJDES = 'NOTES URL'.

CALL FUNCTION 'SO_OBJECT_INSERT'

EXPORTING

FOLDER_ID = FOLDER_ID

OBJECT_TYPE = 'URL'

OBJECT_HD_CHANGE = L_OBJ_DATA

IMPORTING

OBJECT_ID = L_OBJ_ID

TABLES

OBJHEAD = LT_OBJHEAD

OBJCONT = LT_OBJCONT

EXCEPTIONS

ACTIVE_USER_NOT_EXIST = 35

FOLDER_NOT_EXIST = 6

OBJECT_TYPE_NOT_EXIST = 17

OWNER_NOT_EXIST = 22

PARAMETER_ERROR = 23

OTHERS = 1000.

CLEAR: IS_OBJECT.

IS_OBJECT-OBJKEY = WQMNUM.

IS_OBJECT-OBJTYPE = 'BUS2078'.

CLEAR: REL_DOC.

CONCATENATE FOLDER_ID L_OBJ_ID INTO REL_DOC-OBJKEY.

REL_DOC-OBJTYPE = 'MESSAGE'.

CALL FUNCTION 'BINARY_RELATION_CREATE'

EXPORTING

OBJ_ROLEA = IS_OBJECT

OBJ_ROLEB = REL_DOC

RELATIONTYPE = 'URL'

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC EQ 0.

COMMIT WORK.

ELSE.

T_MESSAGE = 'Notification Attachment Add Failed'.

APPEND T_MESSAGE.

CLEAR: T_MESSAGE.

T_MESSAGE = 'Reference:'.

T_MESSAGE+11(20) = H-REF.

APPEND T_MESSAGE.

CLEAR: T_MESSAGE.

T_MESSAGE = 'Notification:'.

T_MESSAGE+14(12) = WQMNUM.

APPEND T_MESSAGE.

CLEAR: T_MESSAGE.

T_MESSAGE = 'URL:'.

T_MESSAGE+5(72) = H-URL.

APPEND T_MESSAGE.

PERFORM SEND-EMAIL.

ENDIF.

ENDFORM. "create-url-attachment

Hope this may help you.

Please reward all the useful answers.

Regards,

Lanka

Former Member
0 Kudos

Lanka:

Thanks for the quick response. Can you please also

post the data declarations?

I had been playing around with :

function SGOS_URL_CREATE_DIALOG

Maybe, if I copy over the above and remove the commit work, it should work but I do not need the pop-up screen. So, I would like to go with your solution.

Thanking you in anticipation.

Regards,

NB.

Former Member
0 Kudos

Sorry. I could not get it to work for "Service" notifications.

You are using Business object BUS2078 i.e. Quality notification.

I would like to use it for Business Object BUS2080 i.e. Service notification or BUS2080A i.e. ServiceNotifBAPIs.

Regards,

NB.