Skip to Content
-1

new Screen as Popup

Nov 30, 2016 at 12:28 PM

61

avatar image
Former Member

Hi

I want to have a popup window when clicking &ADD - button where new data has be added (matnr + 3 fields) and then by saving or leaving this screen it should be updated to my t_tab list in alv when the user saves here the Z-database will be updated.

I need the new screen because in my alv list the keyfield matnr mustn't change but the other 3 fields can.

I have my call screen '0100' but when enter or leave/safe the data is lost and I cannot proceed back to the alv list-

...

case u_ucomm.

when '&ADD'.

call screen '0100'.

...

endcase.

MODULE status_0100 OUTPUT.

SET PF-STATUS '0100'.
SET TITLEBAR '0100' WITH text-400. "Anlage neues Material für Z---

ENDMODULE.

MODULE fill_0100 OUTPUT.

CLEAR t_tab5[].

CLEAR t_fieldcat[].
clear s_fieldcat.
s_fieldcat-fieldname = 'MATNR'.
s_fieldcat-ref_table = 'Z---.
s_fieldcat-edit = 'X'.

clear s_fieldcat.
s_fieldcat-fieldname = 'MATKAT'.
s_fieldcat-ref_table = 'Z---'.
s_fieldcat-edit = 'X'.

clear s_fieldcat.
s_fieldcat-fieldname = 'PRIOV'.
s_fieldcat-ref_table = 'Z---'.
s_fieldcat-edit = 'X'.

clear s_fieldcat.
s_fieldcat-fieldname = 'PRIOV'.
s_fieldcat-ref_table = 'Z---'.
s_fieldcat-edit = 'X'.

MOVE-CORRESPONDING t_tab5 to t_tab[].


ENDMODULE.

MODULE exit_0100 INPUT.

case ok_0100.
WHEN 'BACK'.
MOVE-CORRESPONDING t_tab5 to t_tab[].
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0100.

ENDCASE.

ENDMODULE.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Nov 30, 2016 at 01:06 PM
2
  • No explicit FIELD statement, so I suggest you first read some documentation like Data transport at point of time PAI (look for FIELD and TABLES statements in online help or your Abap course)
  • Else if the values are correctly moved to Abap program what code follows the CALL SCREEN?
  • Also did you use the STARTING AT option in the CALL SCREEN statement (does it appear as a POPUP) ?

Could you give more information on which fields are defined in the screen, in the program and how you manage the insertion of the new record in the internal table before refreshing the ALV display?

Regards,
Raymond

Share
10 |10000 characters needed characters left characters exceeded