‎2008 Apr 30 3:48 PM
Hello....
... I have got a simple problem. But I am not able to solve it.
At first... I have to show a simple screen which looks like the following picture:
+
WDFD00131736A\asdf\img01.jpg+ (url doesn't work. I'm sorry)
The 1st text field is named 'TXT_MATNO'. The 2nd text field is named 'TXT_AMOUNT'.
I uses Parameters -->
PARAMETERS: amount TYPE i,
mat_no(20) TYPE c,.So in the Processing before Output section I set the GUI elements:
MODULE status_0100 OUTPUT.
TXT_AMOUNT = amount.
TXT_MATNO = mat_no.
SET PF-STATUS '101'.
ENDMODULE. "status_0100 OUTPUT
This is the part which does exactly what I expect
But now I have got two problems:
how do I get the values from TXT_AMOUNT and TXT_MATNO after clicking OKAY? I always get in the Processing After Inbox section the values set in PBO before. It doesn't matter what I typed in TXT_AMOUNT etc. I found a mechanism named "FIELD <field name>" and tried to transfer the data in GUI elements to the Abap coding by adding
FIELD TXT_AMOUNT module <module name>in the PBI section. But it doesn't work
It is possible to call a dialog out of a class? In Java there is an opportunity to get modal Dialogs. And I need a simple modal Dialog as a "program" in abap.
So I hope you unterstand my problems and may help me
Thanks and best regards
Markus
*&---------------------------------------------------------------------*
*& Report Y_BADI_TEST_PROG
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT y_badi_test_prog.
PARAMETERS: amount TYPE i,
mat_no(20) TYPE c,
werk(100) TYPE c.
*-----------------------------------------------------*
* Processing Blocks called by the Runtime Environment *
*-----------------------------------------------------*
START-OF-SELECTION.
DATA: txt_amount TYPE string,
txt_matno TYPE string.
CALL SCREEN 100.
*----------------------------------------------------------------------*
* MODULE user_command_0100 INPUT
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
IF sy-ucomm = 'BACK' OR sy-ucomm = 'EXIT' OR sy-ucomm = 'CANCEL' OR sy-ucomm = 'CCL'.
LEAVE PROGRAM.
ELSEIF sy-ucomm = 'OK'.
LEAVE SCREEN.
* WRITE: 'ANZAHL: ', TXT_AMOUNT.
* WRITE: 'MAT_NO: ', txt_matno.
* WRITE: 'Werk: ', werk.
WRITE txt_matno.
write txt_amount.
ENDIF.
ENDMODULE. "user_command_0100 INPUT
*----------------------------------------------------------------------*
* MODULE status_0100 OUTPUT
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
TXT_AMOUNT = amount.
TXT_MATNO = mat_no.
SET PF-STATUS '101'.
ENDMODULE. "status_0100 OUTPUT
PROCESS BEFORE OUTPUT.
MODULE status_0100.
PROCESS AFTER INPUT.
FIELD txt_amount MODULE user_command_0100.
MODULE user_command_0100.
Edited by: Markus von Rueden on Apr 30, 2008 4:48 PM
‎2008 Apr 30 4:31 PM
Markus
Try this...
CHAIN.
FIELD: TXT_AMOUNT,
TXT_MATNO.
MODULE field_edits_0101.
ENDCHAIN.
MODULE user_command_0100.
Then dbl click on field_edits_0101.
In the module it creates, put something like this.
TXT_AMOUNT = TXT_AMOUNT.
BREAK-POINT.
run your program
Then look at TXT_AMOUNT and TXT_MATNO
You should see the new values from the screen
‎2008 May 05 2:09 PM
Hi Paul,
your code helped me and it is now working
Thanks a lot.
Do you know anything about BADIs? Or may you tell me some online-tutorials etc?
That would be veriy nice.
Thanks and best regards
Markus