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

Initialization problem

tanju_lise3
Participant
0 Likes
2,057

Hello Everyone,

In my program, I have a this kind section.

 

*----------------------------------------------------------------------*

* I N I T I A L I Z A T I O N *

*----------------------------------------------------------------------*

 

INITIALIZATION.

break tlise.

fkdat-sign = 'I'.

fkdat-option = 'BT'.

fkdat-low = '20120101'.

fkdat-high = '20121231'.

APPEND fkdat.

REFRESH : s_mblnr.

CLEAR : s_mblnr.

LOOP AT SCREEN.

CHECK screen-group1 = 'KUN'.

screen-input = '0'.

MODIFY SCREEN.

ENDLOOP.

LOOP AT SCREEN.

CHECK screen-group1 = 'PRO'.

screen-input = '0'.

MODIFY SCREEN.

ENDLOOP.

In Selection Screen, I am giving mblnr value. And then I am starting the code.

When I turned back this initialization screen, I want to refresh s_mblnr.

In fact, When I check this section, s_mblnr is initial.

But in first section, there is mblnr value.

How can I refresh mblnr value ?

Best Regards

Tanju

12 REPLIES 12
Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,009

You mean to say after displaying the output when come back still u see the MBLNR value in the Selection screen? Can you please phrase the question clearly.

Read only

0 Likes
2,008

Hi,

I attached the documents.

I thinks, this is more clear.

Read only

0 Likes
2,008

Hi Venkat ,

Your says is right. I attached a document.

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,008

Before you leave to screen 0 clear there.

Where ever you write Leave to Screen 0 / Leave List-processing  once more clear MBLNR here.

hope this helps.

Read only

Former Member
0 Likes
2,008

Hi,

Are you saying you want the s_mblnr value field be refreshed when you press back button on your report?

Regards,

Vidya.

Read only

0 Likes
2,008

Hi Vidya,

You are right, I want to exactly like this.

Read only

basarozgur_kahraman
Contributor
0 Likes
2,008

Hi Tanju,

You can refresh in

AT SELECTION-SCREEN OUTPUT event.

Ex:

AT SELECTION-SCREEN OUTPUT.

REFRESH: s_mblnr.

Read only

0 Likes
2,008

Merhaba Ozgur,

There is no any problem when I running the code firstly.

After turned back , mblnr is not refresh.

(Ilk calistirmada sorun yok, fakat geri donup baktığım zaman mblnr de hala deger var.)

Tesekkurler

Read only

0 Likes
2,008

Hi,

There are many methods to do this, but one approach is -

Create a custom transaction code ZTCODE for your report and in your back button code -

If sy-ucomm = 'BACK'.

call transaction 'ZTCODE'.

Endif.

This will open the transaction fresh and refreshes all the parameters.

Regards,

Vidya.

Read only

0 Likes
2,008

Merhaba Tanju,

Here is a small example:

REPORT  ztest.

TABLES: mkpf.

DATA: runfinished TYPE boolean.

SELECT-OPTIONS: s_mblnr FOR mkpf-mblnr.

AT SELECTION-SCREEN OUTPUT.

   IMPORT runfinished FROM MEMORY ID 'RNF'.

   IF runfinished = 'X'.

     CLEAR runfinished.

     EXPORT runfinished TO MEMORY ID 'RNF'.

     REFRESH: s_mblnr.

   ENDIF.

START-OF-SELECTION.

   WRITE: 'Mblnr:', s_mblnr-low.

   

   runfinished = 'X'.

   EXPORT runfinished TO MEMORY ID 'RNF'.


Read only

koolspy_ultimate
Active Contributor
0 Likes
2,008

Hi,

check this below code

report  ztemp.
tables: vbrk.

parameters: s_date like sy-datum .

at selection-screen output.
clear s_date.

start-of-selection.
   select * from vbrk up to 10 rows.
     write:/ vbrk-vbeln,
             vbrk-fkdat,
             sy-lsind,
             sy-tabix.
     sy-tabix = sy-tabix + 1.
   endselect.

Regards

Madhumahesh.

Read only

0 Likes
2,008

Thank You very much for all your answers,

All of them are perfect.

Best Regards,

Good Evening from Istanbul