Regarding sy-batch

hi,
i hav customer no in my selection screen of my report. if i select the menu path program->execute in background and if cust no. is initial, the program shuld execute without any issue whereas if i execute the same program in foreground by hitting F8 and if cust no. is initial it should throw an error message as ' Enter Customer No.'.
how to do this?
can any one help in this.
here is the code which i hav written but it is not working......for both background and fore ground it is giving the error message.
AT SELECTION-SCREEN.
  IF P_KUNNR IS INITIAL.
  if  sy-batch ne 'X'.
  MESSAGE 'ENTER CUSTOMER NUMBER' TYPE 'E'.
ENDIF.
ENDIF.

This check should be done in
START-OF-SELECTION.
sy-batch does not work in AT SELECTION
START-OF-SELECTION.
IF P_KUNNR IS INITIAL.
if sy-batch ne 'X'.
MESSAGE 'ENTER CUSTOMER NUMBER' TYPE 'E'.
ENDIF.
ENDIF.
This will solve ur doubt
Regards,
Prashant

Similar Messages

  • Automatic Batch creation for a material.

    Hi Friends,
    we require automatic batch creation at the time of confirmation of process order for a particular material not for all the materials existing in the same plant and also not for  all the materials existing in the same material type.
    we have activated batch level at the material level,
    Pl give some idea,
    Regards
    Sadan

    Hi,
    Batch is created automatically either when an order is created or released. (setting in OPKP)
    I hope its not possible during confirmation.

  • Batch split in sales order

    Hi,
    I have a requirement as follows regarding the batch determination in sales order.
    There is an item with 4 batches of 10 Qty each.
    In the sales order the item is entered for 24 Qty, system is proposing 1st batch with 10 qty and the balance 14 is confirmed for a different date as no qty available for the stock as on today on the same batch.
    But the stock is available with the other batch items meeting the selection criteria.
    So can anyone let me know when the item is entered for 24, system should propose the available batches as 10 batch1, 10 batch2 and 4 for batch3 in sales order.
    What is the setting required to be done for this scenario?
    Thanks and Regards,
    Gopinath Naik R

    Hi,
    Thanks for your reply.
    But my requirement is exactly the one u have suggested and it goes like this,
    Item A has three batches 00001111, 00002222, 00003333
    00001111  -  12 Qty
    00002222  -  15 Qty
    00003333  -  10 Qty
    When a sale order is created for 14, as per the selection criteria if the selection is as per the sequence shown above, then system is first getting the batch 00001111 of 12 Qty and will prompt for 2 qty of stock not available.
    But ideally system should first get 00001111 of 12 Qty and then in the next line 00002222 of 2 Qty to meet the requirement.
    Please let me know if this was clear and let me know if any possibilities to meet the requirement.
    Thanks and Regards,
    Gopinath Naik R

  • How to configure quality process with batch management.

    Dear Friends,
                we have a scenario,our client receive goods with 101movement type  into quality inspection stock.
    once stock is passed quality check stock,then we will take into unrestricted stock with 321 movement type.
    failed in quality test will  be rejected.please give me suggestion how to map the scenario.while i am testing
    the process in my sandbox,its asking batch number.its not allowing me to post unrestricted stock with 321
    movement type.how to make batch as optional in this scenario?if batch is mainted for the material,how to
    configure the process.we are not using QM module.
    please suggest me.
    Regards,
    Varun

    In Batch management config in Logistic general, Check for the movement type 101 & 321 whether batch creation has been activated to Manual, Automatic, or no creation. In your case it looks like for mvt 321 batch creation is set to manual & for 101 no creation.
    if batch creation is set to manual, enter a manual batch no & proceed.
    But to cross verify wheter 101 has generated batch or not please check the stocks in MMBE.
    Hope this helps.
    Regards
    Mithun

  • Batch management with Inventry management .

    Hi dear all,
    At the time of GR against Purchase Order , i want to copy characteristic in batch from a table .pls help me to map this requirement .
    Regards
    Prerna

    A batch determination does not populate characteristic values, it just uses characteristic values that are available in your batch record.
    the valuation of the batch characteristic is usually done when you create the batch during a goods receipt.
    You have to have the batch classification (class 022 or 023) in your material master, from there it is copied and valuated when you create a batch for this material.

  • Batch Determination while putting Batch Manually

    Dear Friends,
    We just activated batch determination for Delivery process. now delivery determining automatically
    batch when we are going to create delivery.
    we have a question..
    When we select any line from Delivery and press batch split and then delete line from batch split screen.
    now we can manually add batch and it is not taking care of that batch determination rules.
    how can we restrict this bypassing of batch determination stretegy.
    thanks with regards
    Malik

    HI
    Batch Determination is based on the Selection type batch Determination
         immediate selection according to selection criteria
    N     no selection at beginning of batch determination
    O     selection with no selection criteria
    F     selection criteria cannot be changed in batch determination
    Check how you maintained in VCH1/VCH2/VCH3
    if you want the system automatically at the time of delivery mentioned "O"
    and also check the sort rule
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 1, 2012 10:41 AM

  • Pricing of material based on batch

    hello gurus,
    i have a question,here i have scenario in which i want to differentiate the price of the material based on batches.
    pls correct me if i have made some wrong,
    now v/05 i have created a table in which i have taken batch and material as my field
    and now in v/07 i have assigned to access sequence ahd this acess sequence i have added to PR00 condition type.
    now when i go to VK11 i tried to use the acess sequence and give price i get an error.
    pls if u give me some suggestions it will be a great help to me.

    what error do you get...?
    If you are pricing with regards to batch everytime a batch is over the PR00 record will expire. so every time you have a new batch you will have to have a new record. Sound very tedious.
    Let us know when and how exactly do you wish to achieve this..
    Regards

  • B2B batching fails for one failed message

    We have B2B batching implemented for outbound messages. If any one of the messages (to be batched in next cycle) ends in an error, whole Batch is stopped and no message is completed.
    Is there any set up we can do, so that other messages still get batched and processed successfully.
    Regards
    Ravdeep

    B2B batching fails for a failed message
    Regards,
    Anuj

  • No error generated if batch process load file uses wrong naming convention

    Another interesting one...
    When using the batch processing functionality of FDM, which can be executed by either:
    - FDM Workbench (manually)
    - Hyperion FDM Task Manager (scheduled)
    - upsShell.exe (scheduled and executed from a batch script)
    ..., one has to name the data file (to be loaded) using a specific file naming convention (i.e. "A~LOCATION~CATEGORY~PERIOD~RA.csv" format, for example). However, if one does not name the file correctly and then tries to process the file using batch processing functionality using any of the above three methods, FDM happily moves the file out of the OpenBatch folder and into a new folder, but the file is not loaded as it does not know where to map it to (as expected). However, there are no errors in Outbox\Logs\<username>.err to inform the user, so one is non the wiser that anything has gone wrong!
    When using FDM Workbench, an error is displayed on the screen (POV - "Batch Completed With Errors, ( 1 ) Files Contained Errors"), but this is the only indication of any error. And normally, one would be scheduling the load using upsShell.exe or Hyperion FDM Task Manager anyway...
    Has anyone else noticed this, or am I doing something wrong here? :-)

    Yes, as per my original post the only feedback on any POV errors appears to be when using the FDM Workbench Batch Processing GUI.
    Regarding the "Batch Process Report in FDM" you mentioned, are you referring to Analysis | Timeline accessible via FDM web client? Unfortunately this does not appear to provide much in the way of detail or errors, only general events that occurred. I cannot locate any batch process report, other than the log output I defined when calling upsShell.exe. However, this contains no POV errors...

  • Traceability with batch class characteristics in batch where used list.

    Hi,
    I have a process order which issues 5 pallets or material and produces 5 pallets of another material. Each pallet is a seperate batch in my scenario.
    All materials are assigned to a batch class and i will be using a class characteristic to enter the issued pallet number (includes material number and batch number)  to the produced pallet batch. This way i want to create a traceability system.
    the problem is i need a way to create a hierarchical view or integrate this scenario to batch where used list.
    there is a badi for where used list to read external data. but i guess that is for something called "external batches"
    can you please guide me for the best practice of doing this?
    Thanks,
    Alper,

    Hi!,
    I think you have to use the mix of two functionalities:
    1. Original batch function
    2. Batch derivation
    This way you can pull the characteristics of the source material batch in to raw material as well as finish material batches.
    In this you have to create a nonvaluated material which is used as original batch mateial. You have to assign this material in material master of the RM and FG alongwith other required entries.  Also you have to use batch derivation function to pull the charactristics of this original material batch in to the RM and FG.
    Please go through the SAP help regarding Original batch and Batch derivation function to have more clarity.
    Please revert back in case of any further issue.
    Regards,
    Uday

  • Batch determination for consignment cycle(pick up process)

    Hi,
    Using consignment fill up process, customer place is filled using movement type 631(W)
    Later on customer returns the material we call it pickup process.
    During this process I am not able to pick the proper batch in VL01N so that we can do the GR after delivery using VL01N transaction.
    In this process, during batch determination I am getting error as "Strategy contains no selection specifications".
    Have I missed something?
    What could be the reason for this this?
    Please revert.
    Regards,
    Dipak

    New batch determination procedure configured.

  • Max record limit for Batch delete

    Hi,
    Is there a limit on the maximum number of records that can be deleted using the batch delete functionality?
    If I select an Account list which has more than 200 records, so it covers more than one page of the list view. When I select batch delete, does that delete all the records or just the 100 records on the first page?
    Regards,

    The batch delete will delete all the records in the list. There is no upper limit on batch delete.
    Edited by: bobb on May 4, 2011 7:30 AM

  • Batch information cockpit - Batch management

    Hello all,
    Could you all pl. mention any information regarding the batch information cockpit and post any documents or weblink related to it.
    thanks,
    Maxx

    Hello Maxx,
    Here is some more links.
    http://www.sap-img.com/mm030.htm
    http://help.sap.com/bp_bblibrary/500/HTML/Q02_BB_EN_DE.htm (Complete SAP document with business scenario and configuration)
    Hope this helps.
    Regards
    Arif Mansuri

  • Please help  me with some questions with batch input session?

    hello everyone.
      I come to some questions  like
    1 What is a batch input session ,
    2  What is the alternative to batch input session?
    3  An ABAP program creates a batch input session.   We need to submit the program and the batch session in back ground. How to do it? 
       would you please help me with the questions, couldn't thank you more.
       Best regards
                                                                          Frank

    Hi
    Batch Input Session:
    BATCH INPUT SESSION is an intermediate step between internal table
    and database table. Data along with the action is stored in session
    ie data for screen fields, to which screen it is passed, program
    name behind it, and how next screen is processed.
    Three processing modes of executing Batch Input Session :-
    Run Visibly : You can correct faulty transactions online & work step-by-step through  the transactions not yet executed.
    Display Errors only : You can correct faulty transactions online.   Transactions not yet executed, but without error, run in the background.
    Run in Background .
    2) What is the alternative to batch input session?
    Call transaction.
    3) An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
    go to SM36 and create background job by giving
         job name,job class and job steps (JOB SCHEDULING)

  • Batch List Columns Confirmation

    Hey everyone,
    Just wanted to confirm something in regards to batch lists. Either myself, or the AC will be creating batch lists in Excel on set. My question is, can you create columns (as long as they are exactly as in FCP) for take/shot, angle, etc?
    I know the standards are Name, Media End, Media Start, Reel. However, after reel, can I create a column for scene, take/shot, etc?
    Thanks In Advance!
    ~David

    Thanks Han!

Maybe you are looking for