This website is not affiliated with, sponsored by, or approved by SAP AG.

code does not work in ZXPADU02

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

code does not work in ZXPADU02

Postby lkdsdf » Mon Oct 06, 2014 1:45 pm

Helleo,

When I execute this code in a Z program, I can see the attachment in the "Services for object". But when I execute the same code in the include ZXPADU02 (userexit), the attachment is not in the "Services for object", it seems that the COMMIT WORK it not working. Can anyone help me solve this problem? Many thanks.
Here is the code:
Code: Select all
  data: ls_object_identity type borident,
  lo_gos type ref to zcl_gos_document_service.
    ls_object_identity-objkey = '00040026'. "e.g. '0000954410'.
    ls_object_identity-objtype = 'BUS1065'.

    CREATE OBJECT lo_gos.
    CALL METHOD lo_gos->create_attachment
      EXPORTING
        is_object     = ls_object_identity
      IMPORTING
        ep_attachment = ls_object_identity-objkey.
    commit work.
  endif.
Last edited by Gothmog on Tue Oct 07, 2014 3:32 am, edited 1 time in total.
Reason: code tags
lkdsdf
 
Posts: 20
Joined: Wed Jan 02, 2008 9:35 pm

Re: code does not work in ZXPADU02

Postby Grogan » Mon Oct 06, 2014 3:30 pm

ZXPADU02 is the include for exit function EXIT_SAPFP50M_002.

The description for this is "Customer Checks for Personnel Administration and Recruitment", so I would be very wary about having a COMMIT WORK in it.

A couple of things to check:
* Have you confirmed that your exit code is actually being executed, by putting a break-point in it ?
* Does setting the return attribute SHOW_DATA_AGAIN make any difference ?
Grogan

Award cash if useful.
Grogan
 
Posts: 365
Joined: Thu Aug 04, 2005 7:16 pm
Location: Australia

Re: code does not work in ZXPADU02

Postby lkdsdf » Tue Oct 07, 2014 12:15 pm

I have checked and confirm that that my exit code is executed.
I set the attribute SHOW_DATA_AGAIN = 'X' and it does not make any difference.
lkdsdf
 
Posts: 20
Joined: Wed Jan 02, 2008 9:35 pm

Re: code does not work in ZXPADU02

Postby lkdsdf » Wed Oct 08, 2014 1:05 pm

I found the solution.
I wrote a function and made it RFC enabled.
I then call this function in a new task (starting new task).

Thanks.
lkdsdf
 
Posts: 20
Joined: Wed Jan 02, 2008 9:35 pm


Return to ABAP

Who is online

Users browsing this forum: No registered users and 7 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.