Application Development 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: 

Call a program and change the value of its internal table

former_member797394
Participant
0 Kudos

Hello everyone,

I need to call a program from my zprogram and automatically put ticks to the boxes. This is what I wrote:

SUBMIT rsnast0f<br>  WITH s_objky IN r_obj<br>  WITH s_kschl EQ 'SPED'<br>  WITH p_kappl EQ kappl<br>  AND RETURN.

This piece of code accomplishes everything correctly, but I need to change the value of internal table and give g_disp-selfl = 'X'. This what makes problems. Any ideas?

The output is like this:

here I want to put ticks.

1 ACCEPTED SOLUTION

NunoRodrigues
Participant

If you requirement is to reprocess in background messages processed with error, you need to call

WFMC_MESSAGES_SELECT_ALL_FALSE or WFMC_MESSAGES_SELECT and then WFMC_MESSAGES_EXTEND.

Finally you can call WFMC_MESSAGES_PROCESS with the option PI_NO_DIALOG = 'X'

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos

At the moment you call the program using SUBMIT, the memory of the program didn't exist. That means the internal table and G_DISP didn't exist.

It exist just after the START-OF-SELECTION (as you didn't have any events).

So, if you want to change something in this program, you must do it between the START-OF-SELECTION and the LOOP AT FMESS.

former_member797394
Participant
0 Kudos

frdric.girod thank you for your response. I need to make the changes in my zprogram, not in the standard program itself, or I have misunderstood you. Could you please clearify your point of view please? Could you explain with code, please?

FredericGirod
Active Contributor
0 Kudos

My answer means : you cannot do this

Maybe start from the beggining and explain what you are trying to achieve

former_member797394
Participant
0 Kudos

frdric.girod So, the process is:

1) I have created a zprogram

2) I need to call a standrad program and set variables to select screen (which I have successfully done)

3) After this, the standard program gives the result without tick (tick means to re-create incoming delivery)

4) My zprogram needs to put this tick automatically, since this program will work in background.

matt
Active Contributor

As Frederic said: you cannot do it. But you're making a common mistake - you're confusing your proposed solution with the requirement.

  • Your requirement is to recreate incoming deliveries in background.
  • Your proposed solution is to submit RSNAST0F and somehow select all the entries.

Your proposed solution is not possible. It can't be made to work.

NunoRodrigues
Participant

If you requirement is to reprocess in background messages processed with error, you need to call

WFMC_MESSAGES_SELECT_ALL_FALSE or WFMC_MESSAGES_SELECT and then WFMC_MESSAGES_EXTEND.

Finally you can call WFMC_MESSAGES_PROCESS with the option PI_NO_DIALOG = 'X'