0

I want to call Z-transaction via "CALL TRANSACTION" statement and skip the first screen, but AND SKIP FIRST SCREEN statement doesn't work.
I've read that it has sense only when 'ENTER' function code is used for moving between screens of transaction. Is it true?

Therefore I decided to use batch input table (BDC) via CALL TRANSACTION...USING bdc_table statement in order to process first screen in background.
However that way processing is returned to the initial transaction which I don't want to do!
The statement LEAVE TO TRANSACTION doesn't work with BDC table. Is there any other solution?

Addition to tomdemuyt:
Now I'm using batch table but if I used SKIP, I would rather write like this:

AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD lv_tcode.

IF sy-subrc <> 0.
  MESSAGE 'No authorization for this operation!' TYPE 'E'.
ELSE.

*   CALL TRANSACTION lv_tcode  USING bdc_tab
*                              MODE 'E'
*                              UPDATE 'A'.

SET PARAMETER ID 'EBELN' FIELD p_ebeln.
LEAVE TO TRANSACTION lv_tcode AND SKIP FIRST SCREEN.
ENDIF.

On the first screen (the selection screen) p_ebeln parameter has to be selected and passed to the second screen without showing first.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
  • AND SKIP FIRST SCREEN does work, can you show us the code with AND SKIP FIRST SCREEN, we will most likely be able to point out the problem. – tomdemuyt Jul 10 '12 at 14:22
  • If you are trying to call a standard transaction, please include the transaction code. – Esti Jul 11 '12 at 07:53
  • No. It is Z-transaction that calls screen (it is a selection screen) from Z-module pool. – Suncatcher Jul 11 '12 at 08:05
  • What does your first screen? Are all (needed) fields defined via set/get parameter? How do you confirm the first screen? Is it just an enter (ok) or do you need a function key (that could be the problem). – knut Jul 13 '12 at 12:12

1 Answers1

1

I'm not sure what you're trying to do. Are you trying to skip the first screen and go to the second screen? If the transactions you're trying to call are executable programs, you have a few more options with submitting the program directly:

SUBMIT zprogram 
  WITH param1 = 'VALUE' 
  WITH selopt BETWEEN 'a' AND 'b'.

Alternatively you change the batch table to a selection table of type RSPARAMS. There are many other options including submitting with a specific variant, or calling a specific screen etc.

Jorg
  • 7,219
  • 3
  • 44
  • 65
  • to Jorg: Yes. You understood correctly what I'm trying. But the transactions I'm trying to call from the initial transaction are not executable programs. They are binded with (they call) screens of Z module pool, and therefore cannot be called via "SUBMIT". What are the other solutions? – Suncatcher Jul 11 '12 at 07:56
  • Have a play around making a recording of the transaction in transaction `SHDB`, it records screens and screen values for you. You can then copy that recording and use it to populate the BDC_TABLE. You may be able to just stop the transaction halfway through by just not populating enough screens or values. Check in the recorded code for the start of a new screen and the value of `BDC_OKCODE`. Let me know if that makes sense to you, I can send you an example – Jorg Jul 11 '12 at 23:41
  • to Jorg: As I said before, BDC table population is the solution I'm using right now)) And all works perfect. But there is small problem: I want that the processing of initial (calling) transaction would have stopped and called (with skipped first screen) transaction handle the program processing but not return it to initial transaction (the same logic have LEAVE TO TRANSACTION statement). – Suncatcher Jul 12 '12 at 10:32
  • But! Now after the commiting data to DB called transaction returns processing to initial transaction (the logic of CALL TRANSACTION statement). But it's not what I want. I want something like "LEAVE TO TRANSACTION ... USING bdc_tab". But this is not working. How to implement this? – Suncatcher Jul 12 '12 at 10:32
  • Still trying to wrap my header around your problem... PROGRAM1 calls PROGRAM2 by selection screen but after processing that, it returns to PROGRAM1 instead of quitting. A `leave to screen 0.` statement after the `CALL TRANSACTION`? – Jorg Jul 13 '12 at 07:17
  • Thank's for participation. The transaction was modified with Enter fcode in order to enable "SKIP FIRST SCREEN". Question closed. – Suncatcher Jul 25 '12 at 09:27