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

Problem with New task

former_member384574
Active Participant
0 Likes
3,022

Hello experts,

We are facing a strange problem with an ALV list which triggers the transaction QM02. The problem is that this ALV has a hotspot which open a new window to QM02. We have detected that the PBO of the QM02 is not being executed, so the text edit which is in the QM02 is not being refreshed correctly. We are using the FM ABAP4_CALL_TRANSACTION

Do you kow how can we solve this problem?

Thank you so much in advance,

Regards,

Rebeca

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
0 Likes
2,759

Hi rebeca

Why not use CALL TRANSACTION statement?

You can execute it with the AND SKIP FIRST SCREEN additional and set the QM02 initial input value using parameter ID IQM.

Hope this helps.

regards,

Mateusz

10 REPLIES 10
Read only

MateuszAdamus
Active Contributor
0 Likes
2,760

Hi rebeca

Why not use CALL TRANSACTION statement?

You can execute it with the AND SKIP FIRST SCREEN additional and set the QM02 initial input value using parameter ID IQM.

Hope this helps.

regards,

Mateusz

Read only

0 Likes
2,759

Becaus if I use call transaction the ALV is lost... The idea is to have the ALV list in one mode, and when the user clicks the quality notification, this open another thread... But I can't understand why the PBO is not being executed 😞

Read only

2,759

Of course, that makes sense. 🙂

How about function CC_CALL_TRANSACTION_NEW_TASK called with a RFC destination?

CALL FUNCTION 'CC_CALL_TRANSACTION_NEW_TASK'
  STARTING NEW TASK 'QM02'
  DESTINATION 'NONE'
  EXPORTING
    transaction = 'QM02'
    skip_first_screen = abap_true
  TABLES
    paramtab = lt_parameters
  EXCEPTIONS
    communication_failure = 97
    system_failure = 98
    OTHERS = 99.

regards,

Mateusz

Read only

0 Likes
2,759

I don't see why CC_CALL_TRANSACTION_NEW_TASK should be better than ABAP4_CALL_TRANSACTION !? (they probably do the same CALL TRANSACTION - I think the issue is more related to memory not released between 2 calls)

Read only

former_member384574
Active Participant
0 Likes
2,759

Yesssssssss!!! That solve my problem!!! 🙂 🙂 🙂 Thank you so much!! I owe you a beer!!! 🙂

Read only

0 Likes
2,759

Can you explain what you did differently?

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,759

Can you clarify if your current code is:

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
  STARTING NEW TASK 'ANYTHING'
  EXPORTING
    tcode                   = 'QM02'
    skip_screen             = abap_true
  TABLES
    using_tab               = using_tab
  EXCEPTIONS
    call_transaction_denied = 1
    tcode_invalid           = 2
    communication_failure   = 3
    system_failure          = 4
    OTHERS                  = 5.

Right? Or is it something else?

Read only

former_member384574
Active Participant
0 Likes
2,759

Hello Sandra,

I've tried to send you a direct message, but it is not working.

The old code that we have was:
  CALL FUNCTION 'ZABAP4_CALL_TRANSACTION'
    STARTING NEW TASK 'MSC3N'
    EXPORTING
      tcode      = c_trans
      mode_val   = c_mode_e
      memory     = l_informe
    TABLES
      using_tab  = i_bdc_tab
      spagpa_tab = lt_spagpa.

The FM was an RFC, with the following code:

  SET PARAMETER ID 'ZABC' FIELD memory.

  CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
    EXPORTING
      tcode      = tcode
      mode_val   = mode_val
    TABLES
      using_tab  = using_tab
      spagpa_tab = spagpa_tab.

Does this is the same as you send me? Maybe it was for the RFC connection?
Read only

0 Likes
2,759

I don't understand why your code is so complex, but yes, I think your code could be simplified as follows, and that should work identically (and so, it corresponds to what I said, except SKIP_SCREEN, MODE_VAL and SPAGPA_TAB):

lt_spagpa = VALUE #( BASE lt_spagpa ( parid = 'ZABC' parval = l_informe ) ).

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
    STARTING NEW TASK 'WHATEVER'
    EXPORTING
      tcode      = c_trans
      mode_val   = c_mode_e
    TABLES
      using_tab  = i_bdc_tab
      spagpa_tab = lt_spagpa.

Anyway, it was just a question, so thank you for providing the code when you ask programming questions!

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,759

To clarify things, if you used STARTING NEW TASK, it's like opening a new SAP GUI window, it's a new user memory, this memory is not shared with other sessions (except SPA/GPA memory but your question doesn't let think that it's related), so there's no reason that in one case it "works", and in another case it "doesn't work". I think that if you call ABAP4_CALL_TRANSACTION twice, with exactly the same parameters, the problem doesn't occur (if it occurs, then you must have some custom code inside the transaction). The reason of the problem must be something else, but you should investigate a little bit further to give more details.