2007 Nov 27 4:56 AM
Hi,
i have created one textbox that i have directly taken from the DB table.
based on the lifnr i wants to get the details in other textboxes. How can i write the code for that?
Hi
First Define a Button like OK or SUBMIT in the first screen XXX1 and assign code to it ex: BUT_S1
DATA: IOF_S1(10) TYPE C,
IOF_S2(10) TYPE C.
DATA: OK_CODE TYPE SY-UCOMM.
MODULE USER_COMMAND_XXX1 INPUT
CASE OK_CODE.
WHEN 'BUT_S1'.
CALL SCREEN XXX2.
ENDCASE.
MODULE STATUS_XXX2 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
Fetch the record from the database using the IOF_S1 and place it in a work area
and assign the required field from the workarea to the IOF_S2
ENDMODULE. " STATUS_XXX2 OUTPUT
Hope this helps you
Thanks Ravi
Message was edited by:
Ravikanth Alapati
2007 Nov 27 5:05 AM
Hi,
in user command(PAI), check for ok code = 'ENTER'. then based on the enterd values fetch the other details from the database into a global variables.
In PBO, if this global variable is not intial, assign the values to respective text box.
reward point if useuful,
Regards,
Niyaz
2007 Nov 27 5:14 AM
In pai.. write a case statement as..
case sy-ucomm,
when <button>
then fetch data using select statement with where condition as lifnr.
thats it..when user presses, say enter pai will be triggered and case statement executes,fetching the data..
reward if helpful..thanx..
2007 Nov 27 8:46 AM
Hi..
Create one button with function code.
In PAI,
CASE OK_CODE.
WHEN <Function code of button>
<Select statement with where condition on lifnr and store selected data in global variable which should be of same name as the textboxs on screen.>
ENDCASE.
Note: OK_CODE, you need to declare in TOP Include file with type SY-UCOMM or you can directly use SY-UCOMM instant of OK_CODE but use of OK_CODE is more preferable.
2007 Nov 27 9:13 AM
Hi
First Define a Button like OK or SUBMIT in the first screen XXX1 and assign code to it ex: BUT_S1
DATA: IOF_S1(10) TYPE C,
IOF_S2(10) TYPE C.
DATA: OK_CODE TYPE SY-UCOMM.
MODULE USER_COMMAND_XXX1 INPUT
CASE OK_CODE.
WHEN 'BUT_S1'.
CALL SCREEN XXX2.
ENDCASE.
MODULE STATUS_XXX2 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
Fetch the record from the database using the IOF_S1 and place it in a work area
and assign the required field from the workarea to the IOF_S2
ENDMODULE. " STATUS_XXX2 OUTPUT
Hope this helps you
Thanks Ravi
Message was edited by:
Ravikanth Alapati
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |