2007 Jul 06 4:50 PM
Hello all,
I wrote a program to insert dates on item for a given PO. Basilcally, user will (on selection secreen) input the PO, the range of line items, and the new dates to write or overwrite.
This program is working fine, but after running the program, i want to display a message for the user that that a certain number of line items have been update. The message should look something like this:
5 line items dates updated for PO 45............5.
Summary of the program is like this: I fetch all the data for the PO from the selection screen into a work area, The i use EIPO to get all the line items into an internal table then using the line item range from the selection screen, I loop through to pick the line items and drop them into the final internal table.I know pass this internal table to the Function Module to update the PO.
So basically, i want to display a result that so,so number of line items have be updated on the PO 45..........
Thanks
2007 Jul 06 5:05 PM
Hi Basil,
if you don't want to create your own Z message, use a SAP message like R1 000:
Describe table <final internal table>.
message ID = 'R1' TYPE = 'S' NUMBER = '000'
with sytfill 'ine items dates updated for PO' <PO number> ''.Regards,
Clemens
Hello all,
I wrote a program to insert dates on item for a given PO. Basilcally, user will (on selection secreen) input the PO, the range of line items, and the new dates to write or overwrite.
This program is working fine, but after running the program, i want to display a message for the user that that a certain number of line items have been update. The message should look something like this:
5 line items dates updated for PO 45............5.
Summary of the program is like this: I fetch all the data for the PO from the selection screen into a work area, The i use EIPO to get all the line items into an internal table then using the line item range from the selection screen, I loop through to pick the line items and drop them into the final internal table.I know pass this internal table to the Function Module to update the PO.
So basically, i want to display a result that so,so number of line items have be updated on the PO 45..........
Thanks
2007 Jul 06 4:57 PM
Hi,
The function module you are using whether it is return sy-subrc value or any return variables?
aRs
2007 Jul 06 5:33 PM
Hi aRs,
The function module is EXPIMP_POSTING. its doesn't return any value or sy-subrc.
Thanks.
2007 Jul 06 5:05 PM
Hi Basil,
if you don't want to create your own Z message, use a SAP message like R1 000:
Describe table <final internal table>.
message ID = 'R1' TYPE = 'S' NUMBER = '000'
with sytfill 'ine items dates updated for PO' <PO number> ''.Regards,
Clemens
2007 Jul 06 6:02 PM
Hi,
create a message in your custom message class YAA (for example)
& line item(s) dates updated for PO &
i think you are calling function module within the loop.
data : begin of itab1 occurs 0.
tline liike tline.
data : end of itab1.
clear; v_no, v_flg.
sort itab by vbeln.
Loop at itab.
at new vbeln.
clear v_no.
endat.
call function 'EXPIMP_POSTING'
tables
fxeikp = lt_xeikp
fxeipo = lt_xeipo
fxeiei = lt_xeiei
fyeiei = lt_yeiei
fxeiuv = lt_xeiuv
fyeiuv = lt_yeiuv.
if sy-subrc eq 0.
v_no = v_no + 1.
endif.
at end of vbeln.
move 'Y' to v_flg.
endat.
if v_flg eq 'Y'.
message s123(yaa) with v_no itab-vbeln to itab1-tdline.
append itab1.
endif.
endloop.
After the above loop your itab1 contains all messages
Please remember the above said function module not to be used directly. If you see the source code it directly updating the tables.
You need to find proper bapi or use BDC update the values.
aRs