‎2007 May 14 12:36 PM
‎2007 May 14 12:40 PM
Hi padma,
Which data u want to modify.. if is for any SAP tables u can do it.
--patil
‎2007 May 14 12:42 PM
for example for eban table i want to modify purchase requisition details
‎2007 May 14 12:42 PM
‎2007 May 14 12:43 PM
Hi,
Yes u can modify...
For that ,while displaying a field use this syntax..
Write : it_xyz-field input on.(so that the ouput filed will be input enabbled)...
Then u can enter something in that field and ,when sy-ucomm = 'SAVE'.
u can save that data .......
Cheers
Ravi
‎2007 May 14 12:45 PM
‎2007 May 14 12:48 PM
Hi Padma,,
i dont know in which case you want to modify the data...
But its not advisable to modify data in a single table programatically...
The PR data is not going to store in only one table,,,Always its better to flow the data through transaction only....
If you really so keen to modify the PR data...
Then once u diplsay the result in output...Make the filed(which u want to modify) input enabled..
Once the user enters the data and press on save...
if sy-ucomm = 'SAVE'.
BDC FOR ME52N
endif
I think u got my logic...if not revert ack to me..
Cheers,
Ravi.
‎2007 May 14 12:49 PM
yes we can modify the data in some cases.........
you can provide that option to end user by using modify statement
exampple
Report zxxxx.
DATA: box(1) TYPE c, lines TYPE i, num(1) TYPE c.
SET PF-STATUS 'CHECK'.
DO 5 TIMES.
num = sy-index.
WRITE: / box AS CHECKBOX, 'Line', num.
HIDE: box, num.
ENDDO.
lines = sy-linno.
TOP-OF-PAGE.
WRITE 'Select some checkboxes'.
ULINE.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'READ'.
SET PF-STATUS 'CHECK' EXCLUDING 'READ'.
box = space.
DO lines TIMES.
READ LINE sy-index FIELD VALUE box.
IF box = 'X'.
WRITE: / 'Line', num, 'was selected'.
box = space.
MODIFY LINE sy-index
FIELD VALUE box
FIELD FORMAT box INPUT OFF
num COLOR 6 INVERSE ON.
ENDIF.
ENDDO.
ENDCASE.
This program creates a basic list with the status CHECK. In the status CHECK,
function code READ (text Read Lines) is assigned to function key F5 and to a
pushbutton. The user can mark checkboxes and then choose Read Lines.
In the AT USER-COMMAND event, the system reads the lines of the list using READ
LINE. It continues processing the selected lines on a secondary list. When returning to
the basic list, the system deletes the marks in the checkboxes of the selected lines
using MODIFY LINE and sets the format INPUT OFF to the checkboxes. In addition, it
changes the format of field NUM.
The user can now mark only those lines that have not yet been changed.
Regards
‎2007 May 14 12:50 PM
HI,
check writing this single statement.
data:var(20) value 'sap user'.
data:variable(20) value 'sap'.
write:/ var input on,variable input on.
write:/ 'sample' input on.
to modify ur interactive list u just write INPUT ON at the end of ur variables.
rgds,
bharat.
Message was edited by:
Bharat Kalagara