1

I am facing problem in executing IP30 (maintenance plant scheduling) tcode from report background. I have tried using submit and return, in this case, it is executing but not returning to the caller program, it remains on the screen and after clicking back button it returns to the calling program. Is there any other way....I can do it easily.....please help...

DATA: lt_seltab  TYPE TABLE OF rsparams,
        ls_seltab  LIKE LINE OF lt_seltab.

  ls_seltab-selname = 'WPLAN'.
  ls_seltab-KIND    = 'S'.
  ls_seltab-SIGN    = 'I'.
  ls_seltab-OPTION  = 'EQ'.
  ls_seltab-LOW     = '23'.
  APPEND ls_seltab TO lt_seltab.

  SUBMIT RISTRA20
    WITH SELECTION-TABLE lt_seltab AND RETURN.
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
rhsabbir
  • 247
  • 1
  • 6
  • 19
  • What do you mean by *caller program* and *calling program*? – Suncatcher Sep 19 '17 at 07:07
  • program from which i am executing the code..@Suncatcher – rhsabbir Sep 19 '17 at 07:45
  • Which of the two? `SUBMIT` in the form you gave it here always returns to the caller (originating) program. If under *it returns to the calling program* you mean that execution returns to the originating program, this is NORMAL behavior. If you wanna it behave other way, just remove `AND RETURN`. – Suncatcher Sep 19 '17 at 11:09
  • i just simply want to return to the originating program, but it's not working using 'and return' because it takes to the screen and stays there until i press back button twice to return back to originating program...@Suncatcher – rhsabbir Sep 19 '17 at 11:27
  • Then smth is wrong on that selection screen. Maybe not all obligatory fields are filled or whatever. On RISTRA20 start screen I see at least one field (Maintenance plan) that is obligatory, but it may be more. – Suncatcher Sep 19 '17 at 13:15
  • Yes,but I have already passed the warpl value to RISTRA20 and executed it.....there is no problem...my main problem is it does not return to program after execution.... – rhsabbir Sep 19 '17 at 14:05
  • Give us the full subroutine code, where you call it and the screenshot what's going on after submit. – Suncatcher Sep 19 '17 at 14:15
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/154804/discussion-between-noob-coder-and-suncatcher). – rhsabbir Sep 19 '17 at 14:25
  • I think the problem is that the transaction `IP30` is actually doing batch input, so it uses `CALL TRANSACTION` internally. I am not so sure if `SUBMIT` and `CALL TRANSACTION` can be used together without any unexpected effects. – Jagger Oct 05 '17 at 18:53

1 Answers1

1

you can try with call transaction and BDCDATA.

data:
  lt_bdc type table of bdcdata,
  ls_bdc type bdcdata.

  ls_bdc-program = 'RISTRA20'.
  ls_bdc-dynpro  = '1000'.
  ls_bdc-dynbegin = 'X'.
  append ls_bdc to lt_bdc.

  ls_bdc-fnam = 'WPLAN-LOW'.
  ls_bdc-fval = 'WPLAN'.
  append ls_bdc to lt_bdc.

  ls_bdc-fnam = 'BDC_OKCODE'.
  ls_bdc-fval = '=ONLI'.
  append ls_bdc to lt_bdc.

  call transaction 'IP30' using lt_bdc mode 'N' update 'S'.
manuel_b
  • 1,646
  • 3
  • 20
  • 29