‎2008 Jun 26 1:03 PM
Hi!
can anyone help me out of the situation.
I have two text box designed on screen
for a module pool program----
say for example userid and username.
now whatever user enters on screen
for the two text box userid and username -
it should hit a customised transparent table
maintained in data dictionary and update the
corresponding field in the table.
now how to write the code in the flow logic.
regards
Amit
‎2008 Jun 26 2:36 PM
Hi Amit,
you can use 'MODIFY' to update the transparent table.
The MODIFY statement either updates a record or insert a record in database table.
If the key field's value matches with the values you want to enter then it will update that record otherwise it inserts a record in database table.
First:- declare a work area of type of that table
e.g. Transparent table name:-Z_TEST_TAB
then declare a work area like this
data: wa_z_test_tab type z_test_tab.
Second:- Populate the work area
wa_z_test_tab-userid = p_userid. (or Text field in your
screen)
wa_z_test_tab-username = p_username.
Now:- use the modify statement
MODIFY Z_TEST_TAB from wa_z_test_tab.
I hope this will help you.
Please give points if it helps you.
‎2008 Jun 26 1:07 PM
Hi,
INSERT INTO <dbtab> VALUES <struct> ACCEPTING DUPLICATE KEYS.
IF sy-subrc = 0.
MESSAGE I100(zmsg) WITH
'Data is uploaded to table <Ztable> successfully.'.
ELSEIF sy-subrc = 4.
MESSAGE W100(zmsg) WITH
'Warning: Duplicate Key Entries!'.
ELSE.
MESSAGE E100(zmsg) WITH
'Data uploading has failed. Please check.'.
ENDIF.Regards
Adil
Edited by: Syed Abdul Adil on Jun 26, 2008 2:13 PM
Edited by: Syed Abdul Adil on Jun 26, 2008 2:14 PM
‎2008 Jun 26 1:13 PM
‎2008 Jun 26 1:18 PM
REPORT ZDATEDIFF.
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW TITLE title.
Parameters: p_name like sy-uname,
p_pas like sy-uname lower case.
SELECTION-SCREEN skip 1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(70) text-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 500.
CALL SELECTION-SCREEN '0500' STARTING AT 10 10 ending at 70 14.
data: wa_user type ztable.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
check screen-name eq 'P_PAS'.
move: 1 to screen-invisible.
modify screen.
endloop.
start-of-selection.
if p_pas = 'venkat'.
wa_user-name = p_name.
wa_user-password = p_pas
insert wa_user to zuser.
endif.
‎2008 Jun 26 2:36 PM
Hi Amit,
you can use 'MODIFY' to update the transparent table.
The MODIFY statement either updates a record or insert a record in database table.
If the key field's value matches with the values you want to enter then it will update that record otherwise it inserts a record in database table.
First:- declare a work area of type of that table
e.g. Transparent table name:-Z_TEST_TAB
then declare a work area like this
data: wa_z_test_tab type z_test_tab.
Second:- Populate the work area
wa_z_test_tab-userid = p_userid. (or Text field in your
screen)
wa_z_test_tab-username = p_username.
Now:- use the modify statement
MODIFY Z_TEST_TAB from wa_z_test_tab.
I hope this will help you.
Please give points if it helps you.
‎2008 Jun 28 6:10 AM