‎2011 Jan 19 11:27 AM
Hi friends,
We are developing a Z report to automatically confirm some modifications in vendors. On the first part of this Z report we describe an internal table and fill it with the vendor codes (field LIFNR) that need to be confirmed.
On the second part of the report we are suposed to update field LFA1-CONFS for these vendors, but direct updates of databse are banned (of course). I've found a function Module called "VENDOR_UPDATE" that could help, but it needs tons of mandatory tables, so I wonder if there is any other Function Module to update this field: LFA1-CONFS, or if someone can propose any other approach to this problem.
Many Thanks for your help.
Ignacio.
‎2011 Jan 19 5:41 PM
Hi Ignacio,
You should realize that FM VENDOR_UPDATE is an update FM so essentially you will be doing a direct update which is what you wanted to avoid in the first place Now if you feel sure about this FM, I would recommend to at least create a change document in the process so there will be an audit trail. Check the changedocument functions/documentation.
In case you want to have piece of mind, please check out program RFBIKR00 and its relevant documentation. This is the SAP way of changing the vendor master data in a controlled way.
Kind regards and good luck,
Robert
‎2011 Jan 19 11:47 AM
‎2011 Jan 19 11:51 AM
Hi Rushikesh,
I've tried with the following text:
CALL FUNCTION 'VENDOR_UPDATE'
EXPORTING I_LFA1 = aux_lfa1.
But I receive a dump saying that I_LFB1 is also mandatory. Maybe I'm missing something.
Thanks for your help.
Ignacio.
Edited by: IGNACIO BELTRAN on Jan 19, 2011 12:51 PM
‎2011 Jan 19 5:41 PM
Hi Ignacio,
You should realize that FM VENDOR_UPDATE is an update FM so essentially you will be doing a direct update which is what you wanted to avoid in the first place Now if you feel sure about this FM, I would recommend to at least create a change document in the process so there will be an audit trail. Check the changedocument functions/documentation.
In case you want to have piece of mind, please check out program RFBIKR00 and its relevant documentation. This is the SAP way of changing the vendor master data in a controlled way.
Kind regards and good luck,
Robert
‎2011 Jan 20 8:14 AM
Hi Robert,
It looks you're right about VENDOR_UPDATE, it would be like a direct update so it's discarded.
About RFBIKR00 it looks that field CONFS is not allowed here so I doubt it is a way.
I am now thinking on the following commands:
set parameter id : 'lifnr' field aux_lfa1-lifnr.
call transaction 'FK08' and skip first screen.
As transaction FK08 is the correct one to confirm the changes and keeps a trace it looks the better approach. The problem is that I can't get this commands working fine, maybe I should add more parameters.
How can I know the parameters I can use with this command?
Thanks for your help. Your answer have been helpful and points have been assigned.
Kind Regards.
Ignacio.
‎2011 Jan 20 5:22 PM
Hi Ignacio,
Since I have never used transaction FK08 myself combined with the fact that I am unclear what exactly your requirements are:
- automate the confirmation of vendor changes;
- provide an easier way for the responsible person to confirm the vendor changes using a drill-down report?
I am unable to help you with this.
I found another SDN thread with FK08 as topic. Maybe check this first and see if that provides some answers.
The link is: [Vendor Confirmation fk08|http://forums.sdn.sap.com/thread.jspa?threadID=1019370]
Good luck,
Robert
‎2011 Jan 21 7:34 AM
Hi Robert,
What I need is to automatically confirm certain vendors (not all of them). So in the first part of my Z report I select all the vendors that should be confirmed, and put them in an internal table. In the sencond part of my Z report I should be able to get all these vendors and modify their LFA1-CONFS field from 1 to 0. The easier way to do this would be to update LFA1 table, but this is banned in my company, so I need to find any other way to modify this. The transaction Codes to confirm vendors are FK08 and FK09, so it looks I need to find a way to use them inside my Z report, but I can't make it work.
Maybe the problem is simply that transaction FK08 can't be used this way I don't know.
Cheers.
‎2011 Jan 21 8:58 AM
Hmmm, Then why dont you follow the ABAP code used in FK08 for updating "CONFS".
Try to open the main program of FK08 (SAPMF02K) {Use SE93 to see thier programs if the Tcodes are blocked directly}
from Menu, EDIT->FindNext -> and paste your search Item "CONFS".
You will get the necessary way to update your program.
Thanks & regards,
Dileep Kumar .C
‎2011 Jan 21 9:31 AM
Hi Dileep,
To explore the insides of SAPMF02K was one of my first ideas, but its full of includes and it's very difficult to see how to handle it to modify LFA1-CONFS in a vendor, any help with this would be more than welcome.
Thanks.
‎2011 Jan 21 9:38 AM
Hi,
Thats what I explained above,
Just follow as I said,
& at the end you will get only 4-5 Includes where your desired field is used.
& al together is less than 200 Lines, so Its easy to trace out your requirement.
Cheers,
Dileep .C
‎2011 Jan 21 2:18 PM
Hi Dileep,
I've spent the whole day trying with this but couldn't make it work.
I've confirmed a vendor through FK08 in debugging mode and it looks that the key is to use this:
module okcode_sperr_loesch.
This module is inside MF02KI00 and I've tried to put it as include inside my report, but it won't stop asking me to define tables and fields, it looks like this include can only be used by SAPMF02K...
I have no more ideas for today, maybe I should put my vendors in a table and then try with LSMW combined with FK08 ?
It's a shame anyway, I think I've been very close.
Cheers.
‎2011 Jan 21 3:08 PM
What are the parameters for deciding which vendor needs to be confirmed? Is that a custom table? If so why don't you code this logic at the time of vendor master create/change itself? You can lookup your custom table at the time of vendor change and if the entry is maintained in this table for the changed vendor, you will clear the CONFS indicator before vendor record is changed.
If that is not possible and users have to manually review before confirming the changes, then it doesn't make sense to have an automated program to automatically confirm the changes... the user has to just bite the bullet and perform one more additional step and confim it from FK08...
Unless changes to the vendor master is so volatile, it does not make sense to automate this process. if there are frequent changes to the sensitive data on the vendor, I would presume that business process needs to be revisited.
‎2011 Jan 24 7:44 AM
Hi Kris,
To try to control the CONFS at the time of the modification was my first attempt, it would be really great doing it that way. The key is that I need to auto-confirm the changes made by interfaces in my system (with a fixed user and in a fixed group of vendors). I tried to put in blank field CONFS at the time of the creation/modification through FIBF transaction, with a Z_SAMPLE_INTERFACE_00001421, but it didn't allow me to modify tables LFA1 or I_LFA1, so I decided to try with a Z report to auto-confirm every day the changes.
In the ...00001421 FM I tried it with the command modify I_LFA1 and modify LFA1 but didn't work. Do you know if I need to do anything else to modify field CONFS?
Many Thanks for your help.
‎2011 Jan 24 7:53 AM
Hi IGNACIO,
I am Extremely Sorry, that I am working in a highly authorised company, where I really dont have access to most of the T-Codes, I am limited to only 50% of ABAP transactions, remaining I have to raise Request for authorisation which has to be created Globally, Let me try one more time if I can hep you out or don't feel bad.
Thanks,
Dileep .C
‎2011 Jan 24 4:01 PM
I have not used BTE's a whole lot, but not sure if you can achieve your functionality in bte...
You can try this customer exit EXIT_SAPMF02K_001 (SAPMF02K) ... validate if the CONFS value is already updated before changing it in debug mode in this exit...
If you cannot find user exits or BADI's, the following method vmd_ei_api=>set_lfa1_confs appears to set the CONFS value... you can always do a implicit enhancement to clear the result of this method (this is my least favorite option and you have to make sure that there are no other places where CONFS value is getting updated)...
‎2011 Jan 25 11:51 AM
Hi Friends,
Just wanted to share that I've found a way to auto-confirm vendors without updating the database.
I've simply recorded one confirmation of a vendor (TCODE FK08) with SAP recorder, and converted the recording into a Funcion Module. Then I've used the new FM in my report to confirm all the vendors that match the requirements and that's all folks!!
Thanks every one for your helpful answers.
Have a great day.
Ignacio.
‎2012 Feb 17 5:32 AM
Hi IGNACIO ,
Could you please tell me how you did Automatic confirmation of vendor , other than updating direct LFA1 and using FM Vendor_Update ?
Thanks and regards ,
Sijin K P.