abapGit / abapgit-api-rfc

abapgit-api-rfc
MIT License
9 stars 1 forks source link

Dump DYNPRO_SEND_IN_BACKGROUND for certain Artifacts with Namespaces #7

Closed thorsten-wolf-neptune closed 4 months ago

thorsten-wolf-neptune commented 1 year ago

Hi me again,

we do experience a dump in st22 when we try to call ZABAPGIT_API_RFC_PULL. dump.pdf

Here my finding: When trying to pull a repository that contains SAP artifacts that are having a namespace. Then a Dynpro Popup would show up for certain SAP artifact types: image

The message in that dynpro is always the same (at least in our case) and is related to the namespace. As of now i identified: ACID -> Checkpoint Groups (Transaction SAAB) image

ENHS -> Enhancement Spots (Transaction SE20) image

and SOTR Texts (come into play when using exception classes that are not message class based) image

It comes up because in the deserialize process some internal sap function modules/classes call function module TRINT_OBJECTS_CHECK_AND_INSERT with parameter IV_DIALOG <> space

so abapgit cannot really influence it 😞

I see one "dirty" workaround: That popup has two buttons: 1 "normal" ok image

and 2. "Furhter for all". image

SAP will check if the message that is about to be shown already accepted with "OK for all" with a global internal table called gt_confirmed_messages. If so they don't show that popup: image

so in my very dirty workaround i did the following: hack the global internal table with a dirty assign 😄 At the very beginning of ZABAPGIT_API_RFC_PULL the following code works to bypass the issue: image

  " BEGIN WORKAROUND FOR POPUP "Object can only be created  in package of namespace ..."
  types: begin of gty_message,
           id type symsgid,
           ty type symsgty,
           no type symsgno,
           v1 type symsgv,
           v2 type symsgv,
           v3 type symsgv,
           v4 type symsgv,
         end of gty_message,
         gtyt_message type standard table of gty_message.

  data: ls_confirmed_message type gty_message.

  field-symbols: <gt_confirmed_messages> type gtyt_message.

  " dummy call to load the function group into memory in order to access the global gt_confirmed_messages itab.
  call function 'TR_READ_CURRENT_ACTIVITY'.

  " try to get the gt_confirmed_messages itab.
  assign ('(SAPLSTRD)GT_CONFIRMED_MESSAGES') to <gt_confirmed_messages>.
  if sy-subrc = 0.
    " got it! now simulate there has been a "Further for all" button press for the necessary messages.
    " that prevents the popup to be shown in (SAPLSTRD)raise_error_or_send_popup
    " as of now we are only aware of the message "Object can only be created  in package of namespace ..."
    ls_confirmed_message-id = 'TR'.
    ls_confirmed_message-no = '007'.
    insert ls_confirmed_message into table <gt_confirmed_messages>.
  endif.
  " END WORKAROUND FOR POPUP "Object can only be created  in package of namespace ..."

any ideas what else we could do to cover this problem? Dirty assigns are the worst to do i know 😃 but i am afraid that is the only solution we have for this...

thorsten-wolf-neptune commented 1 year ago

here the dump again in case you cannot open the pdf. image

larshp commented 1 year ago

I think this is a generic abapGit issue, not only related to the RFC code, ideally a pull should not show additional gui, also when/if moving to all http gui

thorsten-wolf-neptune commented 1 year ago

true. moving to a full non-sap-gui-solution abapgit itself would also face that issue. Should I put this issue in the abapgit repo for a broader audience and dicussion?

larshp commented 1 year ago

yes please

thorsten-wolf-neptune commented 1 year ago

i cannot transfer this issue. should i just create a new one there? https://docs.github.com/en/issues/tracking-your-work-with-issues/transferring-an-issue-to-another-repository

larshp commented 1 year ago

just create a new one