Workflow - Customer Block/Unblock

Hi Experts,
We have done workflow settings as per the link 
https://wiki.sdn.sap.com/wiki/display/ABAP/Workflow%20for%20Customer%20Blocking%20and%20UnBlocking
for Customer Block/Unblock. 
TASK 1 - customer block after create/change - we assined object type ZKNA1 - Method Block,
In our Block method code is as follows
INCLUDE <OBJECT>.
BEGIN_DATA OBJECT. " Do not change.. DATA is generated
DATA:
  BEGIN OF KEY,                                     
      CUSTOMERNO LIKE KNA1-KUNNR,                   
  END OF KEY.                                       
END_DATA OBJECT. " Do not change.. DATA is generated
BEGIN_METHOD BLOCK1 CHANGING CONTAINER.  
update kna1 set sperr = 'X' where kunnr = object-key-customerno. 
END_METHOD.                                                      
We are unable to get the value of the  object-key-customerno in where condition ,
If we dont use where condition all customers are getting blocked.
So how can we get the customer number which is created/changed into my block method?
Please help us.
Rajeswari

Hi ,
I think you can use user-exit to block the customer .
function module : EXIT_SAPMF02D_001
DATA : lv_kna1 type char30 value '(SAPMF02D)KNA1' .
        FIELD-SYMBOLS : <fs_xkna1> type kna1 .
        ASSIGN : (lv_kna1) TO <fs_xkna1> .
        <fs_xkna1>-AUFSD = '01' .
        <fs_xkna1>-LIFSD = '01' .
        <fs_xkna1>-FAKSD = '01' .
Above abap code is trying to input 01 value in Customer View in order to block the customer , you modify the code to suit your requirement ...
Hope it useful for you .
Best Regrads,
Carlos
Edited by: Carlos Zhang on Oct 13, 2010 6:38 AM

Similar Messages

  • BAPI for customer Block/Unblock through transaction code : XD05

    Hi Gurus,
    I want to block/unblock customer sales areas(Transaction code : XD05) through program. Could you please suggest any BAPI for the same. As writing BDC will not be a good choice.
    Please help.
    Thanks,
    Bhupender

    Hello Bhupender,
    the best and easies solution is the MASS maintenance transaction as proposed above.
    For the BAPI question, sorry but there is NO BAPI to maintain a customer master data.
    The function module provided by my predecessor, even if it has the perfect look like is definitively not the one to use.
    Despite the name, this FM is designed to support only the maintenance of CONSUMERs.
    Moreover it is not an RFC enabled function module.
    It might work in your case, as the data to maintain is quite simple and limited but you still may face several troubles like NO change documents and change pointers created and/or no synchronisation with TREX, CRM, ...
    There is also a BAPI with a nice name, but in fact it is designed to be used only with SAP Online Store and SAP Product Catalog.
    The only reliable path for investigation is described within [note 384462|https://service.sap.com/sap/support/notes/384462].
    A other path for investigation is the class CMD_EI_API which has been introduced with ECC 2005 (6.00).
    You could wrap method MAINTAIN_BAPI inside of a bapi function module you would have written.
    Otherwise, but still with limited functionality there are some eSOA webservices to find, read, maintain customer master data.
    Hope this helps.
    BR
    Alain

  • Need standard BAPI for  Block/Unblock Customer

    Hi All,
    is there Standard BAPI for  Customer Block/Unblock .
    Thanks in Advance.

    Hi,
    below is a useful link which gives a list of bapi's,
    http://www.mysaphelp.com/blog/?p=122
    look out for   V02D                           Customer Master: Read/Block
    might be of some Help...
    Thanks,
    Naren

  • Cutomer Block/Unblock reason(XD05)

    Hi All,
    I would like the change/modify/Add the drop down reason in the Customer Block/Unblock deatils.
    like Order Block,Delivery BLock and Billing Block.
    Please suggest.
    Regards,  Vinay

    Hi JJ,
    Thanks for you rreply.
    My problme is solved.
    May i know the flow for the same T-code?
    Regards
    Vinay

  • Sales of block\unblock customer

    Hi all,
        I am doing workflow to " notify sales of block/unblock customer ". The transactions to be used are fd05 or xd05. Can anyone pls suggest me the related BOR  to trigger the workflow.
    Points will be awarded,
    thanks,
    praveena.

    Put on the event trace via transaction SWELS. Then perform the action you need to in FD05 or XD05. If an event is triggered it is listed in the event trace. You can read it out via transaction SWEL. In the event trace also the related BO is mentioned. Try if this solves your problem.
    By the way: probably you have to do some programming to incoporate the change documents of the BO of the customer. The BO will be BUS1006, but likely the event triggered is BUS1006-CHANGED, which will also be triggered by other changes in the customer (e.g. the name or the address). Look in table CDHDR and CDPOS to find the changedocuments.
    Good luck!
    Kind regards,
    Joost van Poppel
    Edited by: Joost van Poppel on Jan 22, 2008 10:00 AM

  • Block/unblock customer report

    hi all,
    plz solve my problm in block/unblock customer reports.
    thanks

    Hi Rajiv,
    Is it that you want to knwo how to Block and unblock customer if yes the T-Code is VD05.
    Regards
    Suvin

  • Block/unblock customer

    Hi Gurus,
    can any body tell me
    How we can block the Customer?
    How we can Unblock The Customer?
    wats the functionality of that?
    and where the data will be stored?
    thanks in advance

    Dear Dhanush
    To block / unblock the customer  - VD05 or XD05
    In Table KNA1, you can find the following blocks
    - AUFSD  for Order block
    - LIFSD  for Delivery block
    - FAKSD  for Billing block
    thanks
    G. Lakshmipathi

  • Price variance workflow for blocked invoices in MM purchasing

    Hi Gurus,
    We are implementing price variance workflow for blocked invoices. We built a custom workflow to
    take care of the routing requirement of the customer.
    We also did necessary customization defining the tolerance limits for price variance. Before testing the workflow wanted to check events in SWEL and its is found that system doesn't raise any event for price/ quantity block and hence the workflow is not triggered at all.
    Event trace active flag is set in SWELS. I am not able to figure out what we are missing.The invoice gets created correctly with the price/quantity blocks and blocked invoices are available when we see in Tcode 'MRBR'.
    Any suggestion will be highly appreciated.
    Edited by: srinivas bejjanki on Jan 29, 2009 10:34 PM

    Hello,
    So you are absolutely sure the event trace is on. If you try SWUE with some other event, you see the entry in SWEL, dated a few minutes ago, correct?
    When you try SWUE with BUS2081.BlockedPrice does it give any message?
    Does SWUE work with any other BUS2081 event?
    regards
    Rick Bakker
    Hanabi Technology

  • Blocked/UnBlocked PO Line Items

    Hi Guys,
    How to Identify whether a Purchase Order Line Item is Blocked/UnBlocked Internally.
    I have a customer code, wherer I have check for Blocked?UnBlocked PO Line Items and according to that I have tod display the Items in a Report.
    Many thanks for the Help.
    Regards,
    Anbalagan.V

    Hi,
    In EKPO for that PO line item , if
    EKPO-LOEKZ = S i.e. it is blocked
    EKPO-LOEKZ = L i.e. it is deleted
    EKPO-LOEKZ = null i.e. it is unblocked.
    Hope it clarifies.
    Bye
    anupam

  • Purchase Order Block  / UNblock

    Hi all,
    Authorization for block/ubblock indicator  
    how can i do the roles for 2 users only can  BLOCK  /  UNBLOCK the   PO(purchse order)
    where can i get this roles .. i have a role like  MM01 purchaing..  how can i search for this option in that ROLE.
    i there any way to search this. Authorization for block/ubblock indicator  
    Thanksin Advance,
    Anthyodaya.
    Edited by: anthyodaya Reddy Nagaram on Feb 16, 2010 6:02 PM

    Hi Anthyodaya,
    The user exit is the BAdI ME_PROCESS_PO_CUST (shall be implemented via trs SE18), method PROCESS_ITEM.
    This method receives only one parameter which is the PO item object. This object has many interesting methods you can use, among them GET_DATA to get the current item data on the screen (including the deletion flag), GET_PREVIOUS_DATA that gives you the flag store din the database. If they are different, then the user changed the flag and you can check his/her auth. to do this.
    For this purpose you will probably need to define a custom auth. object.
    To issue messages use the macro mmpur_message_forced and the method INVALIDATE() of the PO item object.
    BR
    Raf

  • Is it possible to do manaul posting from FI if the customer blocked

    Dear All,
    If the customer blocked in all the sales areas, is it possible to do manual posting from FI.
    Kindly clarify.
    Regards,
    Mullairaja

    hi raja,
    yes, you are right because even sales area is blocked also you can post in FI
    if it is blocked with COMPANY CODE LEVEL, then its a problem
    hope this clears your issue
    balajia

  • GRC 10.0 Workflow customizing problem

    Hi experts,
    We are working with GRC Access Control 10.0 and when doing the customizing tasks related with workflows we have an issue that doesnt let us continue.
    Here is the background information.
    We are in the "IMG/Governance Risk and Compliance/General Settings/Workflow/Perform Automatic Workflow Customizing" or easiest, we are in transaction code SWU3.
    Here we have: Maintain Runtime Environment, all green, Maintain Definition Environment, all green, Maintain Additional Settings and Services, a red cross :(.
    So, when opening the tree of our red cross task, we find that the only task that is with a red cross is "Maintain Web Server".
    So, we execute the task, and here we have the following information:
    Service = Webflow (Internet)
    Address web server = http://<our web server>:8000/
    Protocol Address = HTTP
    Path of service = sap/bc/workflow_xml/?
    URL = http://<our web server>:8000/sap/bc/workflow_xml/?
    And here is something that kept our attention. When we push the button to test the URL, our IE opens a page but it is in blank (it doesnt show anything).
    As we saw that, we thought that the service was not active and so went to transaction SICF and checked it, and yes, when you test the service, it doesnt work.
    We finally, checked support packages upgrades and went to SP5 in our GRC server and SP5 in both plugins in our SAP ERP server.
    And, here we are. Have no idea what else to do or check.
    Any suggestion?
    Thanks very much in advance.

    Hi,
    I have just checked my SICF settings and found that we have not actually activated those services at all and our NWBC sessions work fine now.
    Have you activated the sap/bc/nwbc and sap/bc/webdynpro services?
    Also, have you activated the required BC sets for the standard content on Access Controls? This removes the need to do a lot of the basic setups but you still need to follow through the event linkages to check the successful generation etc.
    Simon
    Edited by: Simon Persin on Sep 21, 2011 5:51 PM

  • Urgent: Issue in Automatic workflow Customizing.

    hi,
    Can someone please help me with this issue in Automatic workflow customizing ( SWU3)
    When I try to execute the step
    Maintain Runtime Environment > Schedule Background Jobs with missed deadlines
    I get the error message saying
    "Output Device "" not known"
    Can someone help me how to resolve this? This is very urgent for me.
    Regards,
    Sam K

    The guidelines tell you not use the word urgent in your message title, so please don't. Personally I  try to not answer such questions until at least one day has passed, giving you some time to cool off and perhaps solve the problem on your own.
    I can't recall seing this message myself, but my guess is that either your user or the user WF-BATCH (if the job is being scheduled with that user) has a default printer (output device) that is not defined in the system.

  • Sharepoint 2013 designer workflow custom sendemail activity

    Does anybody know sharepoint 2013 designer workflow custom sendemail activity. Current OOB sendemail action from designer workflow cancels the entire workflow when sendemail fails.
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    Hi Amit,
    What error did you meet when you used the OOB ‘Send Email’ action?
    I suggest you fix the error rather than creating a new workflow ‘Send Email’ activity.
    Of course, you can also customize a workflow activity to send email, there are two acticles about creating a custom workflow activity for your reference:
    http://msdn.microsoft.com/en-us/library/office/jj163911(v=office.15).aspx
    http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=37
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Customer block information

    Hi All,
           I want to create the report to get customer block information. How can I determine the user who has deactivated that particular customer and on which date?
    Regards
    Saurabh

    Changes of this type are stored in TABLEs:  CDHDR and CDPOS.
    Look in table CDHDR first.
    OBJECTCLAS = 'DEBI'
    OBJECTID = the customer number
    TCODE = 'VD05'
    This will expose all blocking changes to the customer.
    Note the userid and date/time.

Maybe you are looking for

  • Current Patch Set for Oracle Database Release 11.2

    Hi I am upgrading oracle 10G to 11GR2 in AIX 5.3 Environment with SAP ECC6 , I have just just installled Oracle 11.2.0.1.0 according to the "Database Upgrade Guide -Upgrade to Oracle Database 11g Release 2 (11.2): UNIX". After database software insta

  • Smartform in FI module

    Hi all,          I'm working on the print of corrispondence inside FI module in which there are some programs (RFKOR*) that call SAPSCRIPTS. Does anyone know if SAP offer the same output with a SMARTFORM instead of SAPSCRIPT? In other modules (SD, MM

  • Connecting HP computer to smart TV

    I would like to connect my HP computer to my new smart tv (Samsung).  I bought a 12 ft HDMI cord and the one end fits into the tv but the other end does not fit into any of the ports on the computer.  What kind of cord do I need?  Many Thanks

  • Detected Problem with audio configuration - wont run

    Everything else on pc seems to work fine apart from itunes Can anyone help please? Thank you

  • Registration of new computer to download old purchases on itunes ....

    Hello, I bought music and other things on itunes those last years, and only my iphone and my old computer are recognized, I can't download my purchases on my new computer, it is not recognized by itunes .... what can I do to register this computer wi