2008 Feb 25 8:27 AM
Hi guys,
i need to set the delete indicator on a purchase inforecord. I have tried to test with function module ME_UPDATE_INFORECORD. But I cannot get the indicator set.
Could any of you please expaline, how to use the function module, or advise an other way to do this.
Kind regards
Mikkel
2008 Feb 25 10:01 AM
Try the below example code.
DATA: it_eina TYPE STANDARD TABLE OF eina WITH HEADER LINE,
it_eine TYPE STANDARD TABLE OF eine WITH HEADER LINE.
SELECT * FROM eina INTO TABLE it_eina WHERE infnr = '5300000042'.
IF sy-subrc = 0.
SELECT * FROM eine INTO TABLE it_eine WHERE infnr = '5300000042'.
ENDIF.
DATA: lt_eina TYPE eina,
lt_eina1 TYPE eina,
lt_eine TYPE eine.
LOOP AT it_eina.
LOOP AT it_eine WHERE infnr = it_eina-infnr.
LT_eina = it_eina.
LT_eina1 = it_eina.
LT_eine = it_eine.
"IT_EINA-LOEKZ will be updated with 'X' and not for LT_EINA-LOEKZ
it_eina-loekz = 'X'.
"IT_EINE-LOEKZ will be updated with 'X' and not for LT_EINE-LOEKZ
it_eine-loekz = 'X'.
"XEINA and YEINA will contain same values for all fields except for the fields to be
"updated.
"XEINE and YEINE will contain same values for all fields except for the fields to be
"updated.
CALL FUNCTION 'ME_UPDATE_INFORECORD'
EXPORTING
xeina = it_eina
xeine = it_eine
yeina = lt_eina
yeine = lt_eine
reg_eina = lt_eina1.
ENDLOOP.
ENDLOOP.
Hope this helps.
Thanks,
Balaji
Hi guys,
i need to set the delete indicator on a purchase inforecord. I have tried to test with function module ME_UPDATE_INFORECORD. But I cannot get the indicator set.
Could any of you please expaline, how to use the function module, or advise an other way to do this.
Kind regards
Mikkel
2008 Feb 25 8:34 AM
hi,
this can be done using BDC call transaction method ,
first record the tcode and then using perform statements u can assign a delete, block and unblock indicator.
while recording in menu path u will find the delete indicator.
<REMOVED BY MODERATOR>
Narendar.
Edited by: Alvaro Tejada Galindo on Feb 25, 2008 5:44 PM
2008 Feb 25 8:37 AM
Please record the transaction ME15 to delete the info record. and write a BDC program to do the acutal deletion (Flag).
Thanks,
2008 Feb 25 8:38 AM
HI,
Under Deletion Flags, there are 2 categories:
a) Complete Info record : EINA-LOEKZ
b) Purch Org data : EINE-LOEKZ
Pls set both these fields as required to 'X' while passing as a import parameter to the FM. This should work.
After the Fm executes also give a COMMIT WORK.
<REMOVED BY MODERATOR>
Regards,
JLN
Edited by: Alvaro Tejada Galindo on Feb 25, 2008 5:45 PM
2008 Feb 25 8:54 AM
Try using ME15 transaction to delete the Info record. This would be quite easy compared to usinng FM ME_UPDATE_INFORECORD.
Thanks,
Balaji
2008 Feb 25 9:11 AM
hi mikkel,
if this issue is resolved plz put the code in the thread.
regards narendar.
2008 Feb 25 10:01 AM
Try the below example code.
DATA: it_eina TYPE STANDARD TABLE OF eina WITH HEADER LINE,
it_eine TYPE STANDARD TABLE OF eine WITH HEADER LINE.
SELECT * FROM eina INTO TABLE it_eina WHERE infnr = '5300000042'.
IF sy-subrc = 0.
SELECT * FROM eine INTO TABLE it_eine WHERE infnr = '5300000042'.
ENDIF.
DATA: lt_eina TYPE eina,
lt_eina1 TYPE eina,
lt_eine TYPE eine.
LOOP AT it_eina.
LOOP AT it_eine WHERE infnr = it_eina-infnr.
LT_eina = it_eina.
LT_eina1 = it_eina.
LT_eine = it_eine.
"IT_EINA-LOEKZ will be updated with 'X' and not for LT_EINA-LOEKZ
it_eina-loekz = 'X'.
"IT_EINE-LOEKZ will be updated with 'X' and not for LT_EINE-LOEKZ
it_eine-loekz = 'X'.
"XEINA and YEINA will contain same values for all fields except for the fields to be
"updated.
"XEINE and YEINE will contain same values for all fields except for the fields to be
"updated.
CALL FUNCTION 'ME_UPDATE_INFORECORD'
EXPORTING
xeina = it_eina
xeine = it_eine
yeina = lt_eina
yeine = lt_eine
reg_eina = lt_eina1.
ENDLOOP.
ENDLOOP.
Hope this helps.
Thanks,
Balaji
2008 Feb 25 11:51 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |