PAI in custom screen.

Hi All,
I have a custom screen and the plant will be entered in one of the field available in the screen.
IN PAI, i have written the validation for the entered part. If the user enters wrond plant, the PAI code will display an error message. Now, if the user changes the Plant value in the screen, the screen field is not saving the latest value of the PLant.
Again the PAI will validate the plant entered for the tirst time only..
How to resolve this issue..?????
Regards
Pavan

Hi,
Cleare the plant field after displaying the error message.
IF sy-subre NE 0
MESSAGE 'Invalid Plant' TYPE 'E'.
CLEARE plant.
ENDIF.
Thanks,
Sri.

Similar Messages

  • Custom screen using MB_MIGO_BADI  in MIGO transaction

    Using MB_MIGO_BADI i have cretaed a subscreen in MIGO transaction.WHen i select a particular item in MIGO transaction that particulra item value,i have to get into my custom code to make some validations.In which method i have to use set& get parameters.

    Hi sashi,
    Check the pbo and pai of that screen.
    Regards,
    Madhu.

  • How to maintain the function code added to a custom screen in IW31

    Hello gurus,
    Does anyone know how can I maintain the function code of the push button I have in my enhancement screen in IW31 (Service Order). 'Coz it says "Requested function 'my fcode' is not available". I tried it in VFBS but don't know the screen sequence or what's the right data to put. Please help me with this. Thanks.
    Regards,
    AyemSheera

    Hi, you need add Your Function Code into the Tables T185x (x like T, F...). Call Transaction SM30 (SM31), put the Table name T185 into Table name and select the Button 'Maintain' or Customizing. The Transaction will navigate you to right position in Customizing. Next, you need to find in the Table's T185x Line with the Program Name SAPLCOIH. Then add your code into the Table's. At next, You have to maintain Your function Code in the PAI module of your Custom screen in the TA IW31.
    Sincerely Yours,
    Lubomir.

  • How to make a field in custom screen as display field in screen exit

    Hi ,
    I have created a screen exit for CO02 with a field for item text in header level as input field , when value is given and save button is cliked it gets updated in database but the problem is same field shows as input field in CO03 ( display mode ) .
    Code which i have used .
    in PBO
    if sy-tcode = 'CO03'.
    loop at screen .
    if screen-name cs 'SUBSCREEN' or screen-name cs 'RESB-POTX1'.
    ( subscreen - screen name given in screen editor and   resb-potx1 field name given in screen editor )
    SCREEN-INPUT = '0'.
    modify screen.
    endif.
    endloop.
    endif.
    and even i tried in PAI too .....
    if sy-tcode = 'CO01' or sy-tcode = 'CO02'.
    update resb set POTX1 = RESB-POTX1
    where aufnr = i_aufnr.
    elseif sy-tcode = 'CO03'.
    *oop at screen .
    *f screen-name cs 'SUBSCREEN' or screen-name cs 'RESBD-SORTF'.
    SCREEN-INPUT = '0'.
    modify screen.
    endif.
    endloop.
    endif.
    but itshows as input field only ........how to make that custom field as display field in CO03

    HI Andy,
    Try this out.
    FIrst check the sy-dynnr, if it is same as your custom screen number
    in PBO of your custom screen
    if sy-dynnr = 'YOUR_NUMBER' and sy-tcode = 'CS03'.
    loop at screen
    if screen-name = 'YOUR_SCREEN_NAME'
    screen-input = 0.
    modify screen
    endif
    endloop.
    endif.
    if it wont work they try using Tcode SHD0
    Hope this will serve your purpose.
    Regards
    Ramchander Rao.K

  • In Executable program displaying results in custom screen.

    Hi,
    I have a executable program,  when the program display's the out put of this program I need to display output in custom screen (like screen 100) instead of displaying in default List screen.
    Can any one tell me how to create and display output in that screen.
    Thanks.
    Chris.

    Hi,
      Check the pseudo code....
    <b>Start-of-selection.</b>
    Retrieve data
    <b>End-of-seleciton</b>
    call screen 0100.
    <b>*PBO</b>
    form PBO_200 output.
    endform.
    <b>*PAI</b>
    FORM PAI_200 input.
    endform.
    To call Screens use any of the following commands
    <u><b>1. CALL SCREEN scr.</b></u>
    Addition:
    ... STARTING AT x1 y1 ... ENDING AT x2 y2
    <b>Effect</b>
    Calls the screen scr; scr is thenumber of a screen of the main program. You use SET SCREEN 0. orLEAVE SCREEN. to define thereturn from the CALL screen.
    <b>Addition</b>
    ... STARTING AT x1 y1  ENDING AT x2 y2
    <b>Effect</b>
    The coordinates x1, y1 (start column andstart line in the window) and x2, y2 (end column and endline in the window) define the size and position of the CALLscreen ("top left - bottom right"). Besides these coordinates,you can also see the contents of the primary window, but cannot performany action there.
    <b>Note</b>
    If "ENDING AT ..." is not specified, suitablevalues are substituted for x2 and y2, taking into accountthe size of the called screen.
    <b>Note</b>
    <b>Runtime errors:</b>
    DYNP_TOO_MANY_CALL_SCREENS: No further screen level (callscreen); the maximum number of nested screen levels is restricted to 50at present.
    2. <u><b>SET SCREEN scr.</b></u>
    <b>Effect</b>
    In ABAP dialogs: Sets the number of the nextscreen.
    Screen number scr is then processed when the current screen has finished.
    <b>Example</b>
    SET SCREEN 200.
    <b>Notes</b>
    To leave a CALL SCREEN chain or return to the application menu, use one of the followingstatements:
    SET SCREEN 0. or LEAVE TO SCREEN 0.
    I hope this solves your problem.
    Regards,
    Vara

  • Custom Screen in Shopping cart

    Hi Guys,
    I am currently trying to use the BADi BBP_CUF_BADI to get a custom screen in my Shopping Cart header.
    I created a new custom screen & followed all the steps required.
    I implemented the BADI & actiavted it. To my surprise the custom screen that i cretaed is visible in the carryout sourcing section (instead of the shopping cart section). That is not what i require. I suppouse this is beacuse of the settings that are made in the BADI.
      Under the subscreens tab of the BADI i have maintained the following values:
    Call Program     :  SAPLBBP_SC_UI_ITS
    Scr.No              :  140
    Subscreen area :   GC_SUB_COMPLETE_CUSTOMERFIELDS.
    Can anyone tell me what details are to be maitained, so that we can get the custom screen in  shopping cart section.

    Hi
    Pls refer to the following SAP OSS Notes -
    Note 825569 - Customer Field (CUF). Customer screens are not called
    Note 458591 - User-defined fields: Preparation and use
    Note 672960 - User-defined fields 2
    Note 812679 - BBP_CUF_BADI calls the incorrect template
    You should start with a training on web developement with Internet Transaction Server (ITS).
    ITS is emulating SAP GUI transaction into a web transaction.
    To do this you need:
    - the SAP GUI transaction, program, PBO, PAI...
    - the ITS templates
    For each SAP transaction, there is an ITS service.
    For each SAP dynpro, ITS requires an HTML template.
    So if you use the BADI to call your custom screen (a dynpro from program Z), you must also create the corresponding HTML template.
    If no template is provided, then ITS will use the webgui service to emulate the screen.
    Pls reward suitable points.
    Regards
    - Atul

  • Long text creation in custom screens

    Hi
    Can we add the functionality of adding a long text in the custom screen.
    The long text should be same as the one which SAP provides in standard transactions.
    If possible please tell me the solution.
    Thanks & Regards
    Kapil

    HI,
    yes you can add using TEXT AREA control here is the sample code.
    insert a custom control area in the screen and create a object of the text editor.
    check this code for PBO and PAI.
    here TEDITOR is the custom contorl area name on screen
    <b>MODULE PBO OUTPUT.
      IF EDITOR IS INITIAL.
    *   set status
    SET pf-status '1111'.
    *   create control container
        CREATE OBJECT TextEdit_Custom_Container
            EXPORTING
                CONTAINER_NAME = 'TEDITOR'
            EXCEPTIONS
                CNTL_ERROR = 1
                CNTL_SYSTEM_ERROR = 2
                CREATE_ERROR = 3
                LIFETIME_ERROR = 4
                LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        if sy-subrc ne 0.
    *      add your handling
        ENDif.
        mycontainer = 'TEDITOR'.
    *   create calls constructor, which initializes, creats and links
    *   TextEdit Control
        create object editor
              exporting
               parent = TextEdit_Custom_Container
               WORDWRAP_MODE =
    *               cl_gui_textedit=>wordwrap_off
                  cl_gui_textedit=>wordwrap_at_fixed_position
    *              cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER
               WORDWRAP_POSITION = line_length
               wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
    *   to handle different containers
        container_linked = 1.
        refresh mytable.
      ENDIF.
    ENDMODULE.                 " PBO  OUTPUT
    MODULE pai INPUT.
    case ok_code.
    WHEN 'SAVE'.
    *   retrieve table from control
    clear: txt.
          call method editor->get_text_as_r3table
                  importing table = mytable.
          loop at mytable into wa.
             concatenate txt wa into txt
             separated by '|'.
          endloop.
          shift txt left.
          length = strlen( txt ).
          ztext-CLUSTR = length.
          ztext-text   = txt.
          modify ztext.
          clear: ztext.
          refresh: mytable.
            call method editor->set_text_as_r3table
                  exporting table = mytable.
          Message s000(zwa).
    when 'DISP'.
          select single * from
          ztext
          where fund = ztext-fund.
         SPLIT ztext-text AT '|' INTO TABLE mytable.
            call method editor->set_text_as_r3table
                  exporting table = mytable.
    endcase.
    clear: ok_code.
    ENDMODULE.                 " pai  INPUT</b>
    Regards,
    Wasim Ahmed

  • Tab Order Control on Custom Screens

    Does anyone know how to set the tab stops on a custom screen?  I would like to change the order of where the cursor goes when I hit the tab key.

    Hi
    So it seems a poor solution to code your own function to navigate screen elements utilizing a counter variable and the statement "SET CURSOR FIELD X" told by Prabhu.
    e.g.
    Our new function code: 'NAVFLD' assigned to some F-key.
    *--PAI
    *User commands
    MODULE user_command_100 .
    MODULE user_command_100 INPUT .
    CASE gv_okcode_100 .
    WHEN 'NAVFLD' .
    case gv_navigation_counter .
    WHEN gc_tabstop_x . " = 1
    SET CURSOR FIELD X .
    WHEN gc_tabstop_y . " = 2
    SET CURSOR FIELD Y .
    ENDCASE .
    ENDCASE .
    ENDMODULE .
    P.S. : Code may be revised for some other issues not in context of this issue.
    Hope this works...
    *--Serdar

  • Push Button Problem in Custom screen

    Hi All..
    Hi All..
    In my custom screen, i have 2 (A1, A2) input boxes with F4 option and a Push Button..
    When i select the data in these input boxes, i will click Push Button (COPY) to transfer the data from these (A1, A2) to other two input Boxes (B1, B2)..
    But data are displaying in (B1, B2), if and only if i click the Push Button 2 times..
    How to make the code to display those data from A1-A2 to B1-B2 by Single click..???

    In PAI, I have coded the lines as follow..
    Still i need to click 2 times to get the data displayed in B1,B2..
    ****PAI*****
    when 'COPY'.
    select bezei from tka01 into (it_sap-name) where kokrs = A1.
    endselect.
    select msehi from tka03 into (it_sap-unit_of_meas)
    where kokrs = A2 and STAGR = A1.
    endselect.
    B1 = it_sap-name.
    B2 = it_sap-unit_of_meas.

  • Implemented BADI to add custom screen to VD02 - how to get data to fields?

    hi..
    i have implemented CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS to add a new screen to Customer Master maintenance tcodes.
    When I run VD02 (for example), I get my button and when I click it, my new screen with new fields show up.
    I need to be able to select from a custom table based on the current KUNNR and populate those fields with data for the user.
    I created the custom screen using a Module Pool program - so this does give me PBO/PAI but I don't have access at that point to my S_KNA1 & other structure info that is contained in the BADI which I need.
    How do I pass data to those fields?
    thanks in advance.
    rp.

    At the point you are clicking 'your' button you could export the structures containing the needed data to abap memory. once in your new screen pbo you may import from abap memory.
    do make sure that your development is hit only for the document type and other usage parameters by putting enough filters before the screen call- else this can slow down quite a few things in SD.

  • ALV and custom screens

    I have a program that displays a report using the ALV. I added a status and a few butttons. The user can then choose one of the buttons and go to a subsequent screen (0200). But since the original ALV display isn't a screen I created, I can't return to it from screen 0200.  How can I use both, the ALV and custom screens?

    >>You have to code this as an exit command in the PAI of screen 200.
    can you erlaborate? what should I put after back, exit, cancel? See below. You see I cheated and repeated my initial performs to rebuild the ALV screen..  You can also see the other things I tried.
    MODULE USER_COMMAND_0200 INPUT.
      If sy-ucomm = 'BACK' or
         sy-ucomm = 'EXIT' or
         sy-ucomm = 'CANCEL'.
         PERFORM GET_COCKPIT_SCREEN.
         PERFORM DISPLAY_COCKPIT_SCREEN.
         SET SCREEN 100. LEAVE SCREEN.
         LEAVE TO SCREEN 0500.    "screen # of AVL program

  • Help on Back Button on a custom screen

    Hi,
      I am running a custom report which calls the screen 100 first and upon double click on a particular line item it calls the screen 200. I am facing a problem with back button. When i click back button from screen 200 screen 100 is called properly. But when i click back from screen 100 it should go to selection screen but its again calling the same screen. Please let me know how can i solve this.
    Thank You,
    Regards,
    Swaroop

    In the PAI of the screen 100,  do something like this.
    case ok_code.
      when 'BACK'.
        set screen 0.
        leave screen.
    endcase.
    Regards,
    RIch Heilman

  • Custom screen - do nothing on "ENTER"

    I have a custom screen and it works beautifully except that when I hit ENTER, it acts as though I hit F8.  How can I stop it from doing this?  If it was a section screen I could put
    CHECK sy-ucomm = 'ONLI'.
    but I don't know how to do it in a dialog screen.
    I have two buttons on my status.  One is to exit and the other is to continue.  ENTER exectutes the continue button but I don't want it to do that.
    Regards,
    Davis

    I see what's going on if I understand you correctly.
    You are trying to use the Function Key "Continue" (Green Tick) under the Standard Toolbar in your PF-Status. But this sits under the Standard Toolbar for which SAP has already by default  has the Function Key setting "Enter" automatically so no developer can change it.
    You should create a new button under "_Application Toolbar_" in your PF (GUI) status and then the system would automatically ask you to assign a Function Key to it. So this "Continue" button will come on the Application Toolbar area (the area under where the Title of the screen is) and the Exit button can remain in the Standard Toolbar (up at the top) where you've already defined.
    Now, in your PAI flow logic you should code:
      CASE sy-ucomm.
        WHEN 'EXIT'.
    * your logic......
          LEAVE PROGRAM.
        WHEN 'CONT'.   "<-----this is your new button under Application Toolbar
    * your logic....     
      ENDCASE.
    Hope this solves your issue.
    Cheers,
    Sougata.

  • Comcast new customer screen after firmware update

    Every time I try to update my Airport Extreme's firmware, I get the Comcast new customer screen on my browser and can't access any pages other than that. I've had Comcast come out and they it is a problem with my router and not with them since I can surf the internet when my computer is hooked up directly to the modem. I've tried everything including resetting the Airport and cycling the power and nothing works. The only way I can continue to access the internet is when I upload the factory firmware version to the Airport. Has anyone had this problem before or have any suggestions on how to remedy this?

    yeah I recall that pain in the butt problem. You probably had them(Comcast) install their so called mac software which you should not have done .
    When my memory comes back I'll post the counter measure.
    Although try this in the meantime;
    ethernet from Comcast modem to wan port of apple router. ethernet from your Mac to lan port of Apple router. Power off the modem and the router. Bring the modem up first then the router. Place the router using DHCP and set your wireless config if need be. Should work.

  • Customer screen get populated in activity management

    hi any one can help me out in this pls.
    my client requirement is customer screen get populated in activity management.
    my client using activities in crm.They configured customer sceen in activities.In that they have fields like contract validity, type of contract etc.
    how it will get populated when they enter customer number.

    hi
    can u please elaborate ur requirement what exactly we mean be population of activity screen,i din get exactly
    best regards
    ashish

Maybe you are looking for