Problem with customised subscreen in ME21N

I am using BadI ME_GUI_PO_CUST  & ME_PROCESS_PO_CUST to add a customized subscreen in the header. But the subscreen is only visible with ME23N & ME22N not with ME21N . I am new to BadI, so help is needed.
I have used the following code:
In BadI ME_GUI_PO_CUST with interface IF_EX_ME_GUI_PO_CUST~SUBSCRIBE the code i ve written .. the following code ..
DATA: ls_subscriber LIKE LINE OF re_subscribers.
* we want to add a customer subscreen on the item detail tab
CHECK im_application = 'PO'.
CHECK im_element = 'HEADER'.
* each line in re_subscribers generates a subscreen. We add one
* subscreen in this example
CLEAR re_subscribers[].
* the name is a unique identifier for the subscreen and defined in this
* class definition
ls_subscriber-name = subscreen1.
* the dynpro number to use
ls_subscriber-dynpro = '0002'.
* the program where the dynpro can be found
* "Created in a module pool program in SE80 to hold the subscreen in
*the tcode me21n, me22n, me23n*
ls_subscriber-program = 'ZME_GUI_PO_CUST_SCREEN'.
* each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'CI_EKKODB'.
* a label can be defined
ls_subscriber-label = text-001.
* the position within the tabstrib can be defined
ls_subscriber-position = 13.
* the height of the screen can be defined here. Currently we support two
* screen sizes:
* value <= 7 a sevel line subscreen
* value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
In IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS i ve changed the follwoing .......
type-pools : MMMFD.
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
WHEN 'ZZPAYMENT'. <mapping>-metafield = mmmfd_cust_03.
ENDCASE.
ENDLOOP.
In the badi ME_PROCESS_PO_CUST, their is a method called FIELDSELECTION_HEADER
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER .
DATA: l_persistent TYPE mmpur_bool.
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
* if the item is already on the database, we disallow to change field
* badi_bsgru
l_persistent = im_item->is_persistent( ).
IF l_persistent EQ mmpur_yes.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_03.
IF sy-subrc IS INITIAL.
* <fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
ENDIF.
I have figured out the issue but do not the idea to fix the issue. I have put a break-point in  the badi ME_PROCESS_PO_CUST, having the method called FIELDSELECTION_HEADER & run the tcode ME21N. In the line  l_persistent = im_item->is_persisten & IF l_persistent EQ mmpur_yes and found out that the value of mmpur_yes  equal to 'X',  l_persistent is blank.
Suggestion is widely accepted.
Thanks & regards
Feluda

Try like this.
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER .
DATA: l_persistent TYPE mmpur_bool.
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
* if the item is already on the database, we disallow to change field
* badi_bsgru
l_persistent = im_item->is_persistent( ).
IF l_persistent EQ mmpur_yes.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_03.
IF sy-subrc IS INITIAL.
* <fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
ELSE.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_03.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
ENDIF.
ENDIF.
Let me know if you still have the problem.
Thanks,
Jyothi

Similar Messages

  • Problems with customising menu template backgrounds

    Hi.
    I am experiencing problems with changing the background of the included disc menu templates in PE9. I can change the background image to anything i like on the computer and all seems to work OK but when i burn the project to disc (PAL_Dolby DVD) the custom background image has gone and been replace with the default template imagine.
    Anyone got any ideas whats going on!
    Thanks

    This issue showed up with PrE 9. I do not recall reading of it with earlier versions.
    I do not know if the PSD files have some corruption, or if some change in PrE 9's code "did the deed," but many have filed a Bug Report, and I ask that you please do, as well. It should be an easy fix for Adobe (but I am not a coder, or software engineer, and could be wrong).
    Good luck to us all,
    Hunt

  • Problem with Customised Hover Menu.

    hi Experts,
    I have implemented the drop down Hover menu for TLN using DIV tags. Generally the menu works fine but when the content area consists of  a PDF of Flex Controls like VC iview the menu hides behind the PDF or Flex Controls.
    Searched other threads but not able to understand what has to be done.
    Would anyone please help me to handle this problem.
    Points would be rewarded to helpful answers.
    Regards,
    AD.
    Edited by: A D on Apr 16, 2008 12:31 PM

    hi Experts,
    Would any one please help me to solve this problem.
    Its very Urgent.
    Points would be rewarded to helpful answers.
    Regards,
    AD.

  • Facing problem with call subscreen area in standard infotype

    Dear SAP Guru's,
    I have enhanced standard infotype 0185 from PM01, in assign enhancement tab it create multiple screens ,
    my program name ZP018500, screen number 0200 generated,
    on  0200 screen i need to display two subscreens tfor that
    i have created subscreen area  on srcreen 0200 which is already a subscreen.
    and i am calling two subscreen 0201 and 0202 on that  subscreen area.
    while creating entries for 0185 infotype  my screen keep going in continious loop for call subscreen statement on 0200 screen number.
    roll in fail, session terminated error coming because of this.
    is it correct to create subscreen area on subscreen and calling subscreen on that.
    Guide me to solve the issue.
    Thanks and Regards,
    Syed

    Dear Gopal,
    Thanks for the reply,
    But i can't make 0200 screen as normal screen because it is automatically generated by system while enhancing the standard infotype,
    Please let me know any other solution.
    Regards,
    Syed Taj

  • Want check box checked as default for a newly added subscreen in ME21N

    Hi Guys,
                 I have added a subscreen in ME21N with one field with check box.
    When I enter ME21N I should get that checkbox CHECKED automatically.
    How to do this.
    And one more thing is when manually putting checkmark,when I press enter that check mark is getting deselected.How to overcome this???
    I have used screen exit
                                      SAPLXM06 
                                      screen: 0101   for this subscreen.
    Thanks in Advance.
    Prasad.

    Hi,
    the deselection problem could be caused of an incorrect name of that screen field name. You should check in screen painter if that check box field name is the same name as your data object (e.g. gv_checkbox) .
    Unfortunately it is not possible to define default values within Screen Painter. You have to do this in PBO.
    Regards
    Mark-André

  • Problem with BADI BADI_HU_DIALOG.

    I want to  display some customer fields in the screen 'Addit. Data' in  the Handling Units (transaction vl02n/vl03n).
    Therefore I use the BADI 'BADI_HU_DIALOG', method DEFINITION_SUBSCREEN.
    I need the subscreen in the details, so I use the flag 'IF_DETAIL'. Next I wait  the tcode 'DETZUS' (Additional data).
    if if_detail = 'X' and is_v51g-tabstrip_fcode = 'DETZUS'.
      cf_program = '/SIE/SAPLTS_SD02_VLOG'.
      cf_screen = '9000'.
    endif.
    Now I have the subscreen on the correct Dynpro and only there, but I miss the fields of the standard subscreen. The SAP originial replaces the number of their subscreen  with mine. But what can I do if I also want to use the standard fields?
    First problem:
    is there any possibility to add my subscreen to the standard?
    Second problem:
    I can't transfer the data of CS_VEKP to my subscreen to display or change them.
    What can I do?
    Thanks
    Uwe

    Hi Uwe,
    i have the same problem.
    Do you solve the problem with the missed standard fields?
    I hope you can help me.
    Thanks
    Markus

  • Problems with blog template

    I'm having two problems with the blog template. First, I wanted to add some images to a blog entry in addition to the main photo at the top of the page. I had wanted these to appear below the main text box. So I selected several pictures in iPhoto and dragged them over to the current blog entry. What I got was a new photo page being created and a small image placed on my blog page that was a link to the newly created photo page that contains a thumbnail image of one of the photos on the photo page. Is there no way to simply insert additional images into a blog page? Even if I can't insert the images into my page, there is a problem with the location of that thumbnail image. It somehow got located near the bottom of the page in between the "made on a Mac" logo and the Next link. I can't seem to select it to move it to a different location. I tried right-clicking, option-clicking and clicking with every other modifier key, as well as ordinary clicking, but either nothing happens or iWeb takes me to the new photo page. How can I manipulate this thumbnail object? Finally, out of frustration about being unable to manipulate the thumbnail away from the Next/Previous links, I decided to try to move them. I started with the "Made on a Mac" logo, selected it and then pressed the down arrow. What I had expected was that my page size would increase as I moved the logo down the page. Instead, I seem to have moved the logo down so far that it has disapeared. How do I get it back? What am I doing wrong here?

    I have been corresponding with the company in Lithuania for a few days and we have tried everything we could think of to solve the glitch. I am very much aware of the fact that it is a custom theme, in fact I have further customised it.
    The website in question is a private one. In my home country, we are legally required to post our address on the page. I would not want to braodcast that across the Apple community, if I can help it, so that is not an option. Sorry.
    I would really appreciate if someone who uses GraphicNodes templates could help me out. Thank you

  • Problem with Great Estate Template in iWeb

    Having problems with the Great Estate template for iWeb: On the blog, the picture shows up fine, in the larger, overview version it is all blurred. The software company cannot help me, say it is a program flaw in iWeb? Has anyone else encountered this problem and how did you fix it? Thanks

    I have been corresponding with the company in Lithuania for a few days and we have tried everything we could think of to solve the glitch. I am very much aware of the fact that it is a custom theme, in fact I have further customised it.
    The website in question is a private one. In my home country, we are legally required to post our address on the page. I would not want to braodcast that across the Apple community, if I can help it, so that is not an option. Sorry.
    I would really appreciate if someone who uses GraphicNodes templates could help me out. Thank you

  • Problem with Update Text fields in Infoset

    Hi experts,
    Here i would like to rephrase the question. Normaly while working with Infosets, when press "update text fields" button, those fields having text is updated. But one of my field is not updated. I need some help from you for that.
    One more question i've that my field is having check table so i would like to know how exactly the text field is updated.
    scenario.
    Customized IT9320 has field prt_pos added. This field is having check table T528B. But i want text field to be attached is IT1000-STEXT.
    How this can be done, because i suspect that just using check table field IT1000-STEXT is not attached to IT9320-prt_pos.
    Please help. I'm really got stuck here.
    Thanks a lot,
    Toral.
    Hi,
    I'm working on customised Infotype. I need to add one new customised field ie Present Position. This field has number as well as text associated with it. There is a check table attached with this field so that text can be displayed alongwith number.
    I need this field in SAP/Adhoc query. But when i go to SQ02 this fields shows only value. Text is disabled for this field. I'm not sure why is it so.
    I looked into other infotype which as one field using same data element, and that field shows both value as well as text. Please help me to rectify this issue for present position field.
    Thanks,
    Toral.
    Edited by: Toral Sheth on Jul 4, 2008 2:01 PM

    You would be much better off with one multi-line form field.
    There are many problems with trying to determine when one is at the end of the display field with text entry.

  • Receiver determination - Xpath expression problem with count

    I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice.  If it is greater than the number I want to write out a file to be processed by a different process on the receiving end.  I have created the receiver determination condition with the following conditions:
    (/p1:MT_HOG_Data/row[count(row) > 3] EX)
    (/p1:MT_HOG_Data/row[count(row) <= 3] EX)
    The integration is always processing the second condition no matter how many records come in.  I have tried with and without the multiline option.  Can anyone help with this?
    I have searched through the forum and checked the following links without any resolution:
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    I can't find any examples where a count of records is checked in the expression editor.  Thanks in advance for any help.

    You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
    Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
    Example: you want to send to receiver A if count > 3, else to B:
    you set  /rowNumber EQUAL 4 for sender A
    and /rowNumber NOT EQUAL 4 for sender B
    The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
    Problem with that is that the second condition also will be true because nodes for that condition will be found
    better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
    CSY

  • Problem with sub-screen actions on Cancel button

    Hi all,
    I have a problem with sub-screen.
    I created a subscreen (screen sequence in MM01/MM02/MM03). When users leave this screen, I call POPUP_TO_CONFIRM to ask if they want to save the data.
    1) My goal is: when they choose Cancel, no actions are performed and users will see the current screen. However, I cannot use command: SET SCREEN 0 or LEAVE TO SCREEN 0 because the system gives an error message:
    *SET SCREEN not allowed in subscreens*.
    2) How can we determine when the user leaves the screen? which value of SY-UCOMM will be used to check this?
    Thanks in advance.

    for dis SET SCREEN is not required.
    Consider d code given below as n eg:
    CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          titlebar              = 'SAVE'
          text_question         = 'SOME _QUS'
          text_button_1         = 'YES'
          text_button_2         = 'NO'
          default_button        = '2'
          display_cancel_button = ' '
        IMPORTING
          answer                = l_ans
        EXCEPTIONS
          text_not_found        = 1
          OTHERS                = 2.
      IF sy-subrc <> 0.
        MESSAGE e066.
      ENDIF.
    IF l_ans EQ '1'.    " when yes is pressed
       MODIFY db.
       commit work.
       leave program.
    ELSEIF l_ans EQ '2'.  "when no is pressed
        leave program.
    ELSE.     " when cancel is pressed
    ENDIF.
    In above module when Yes is pressed it saves data den leave prog.
    As no action is specified for cancel button it will remain on that screen only from which popup is called, in this way ur problem can be solved.
    Reward properly.

  • Addinng Delivery address and Texts subscreens of ME21N to MB22

    How to add Delivery address and Texts subscreens of ME21N to the MB22
    (reservations) header level?
    Is there any customisation(From IMG) possible to acheive this?
    This is very urgent.
    My requirement in detail : For Material reservations, the standard transaction MB21 and MB22 must be amended to allow entering Address and text data (header level only), MB23 must be able to show the entered data. Functionality of ME21N at the item level tabs Delivery Address and Texts.
    Thanks in advance for your suggestions and solutions.

    Hello,
    nothing standard in ECC6 EHP6.
    You will have to modify standard screens and use user exits. I would recommend to try something else than reservation or forget your requirements.

  • Problem with a Hazro HZ24Wi (1920x1200 res) with a mini G4

    Hi All - I've tried hooking up a new Hazro screen to my mini (PPc G4) and I got weird green and purple pixel dots randomly spread all over the screen. I hunted around and found out it was a problem with the graphics card not supporting the required resolution (1920x1200).
    But I then found a very useful thread which suggested using an app called switchres to customise the settings (apparently the main problem is the pixel clock running at 135Mhz or higher). However, the instructions were for how to set up for 1680 x 1050. I tried being clever and setting different values but no luck.
    The other suggestion was to use a VGA connector. Would that effect quality? We use the mini as our home ent system for tv and films, as well as web/email.
    Any other ideas? All help gratefully received.

    posted in wrong area by mistake, answered in thread in correct area,

  • Problem with Script Alignment for new printer

    Hi All,
       I'm printing SAP checks to LOCAL printer. Currently we are using Dell W5300n to print checks and the printer has a lot of maintenance problems.  Therefore we purchase a new printer Dell 3110cn  and would like to have it set up to print checks.  We would still keep old printer ( Dell W5300n ) for back up.We changed the printer to new as there is some problem with old printer.
    Problem is , if we print a check from using old printer, the check alignment is good.  But if we print a check from  new printer, the check alignment is off.
    I'm using DINA4 Page format.
    Can you please tell me what is the problem here?
    Thanks,
    Subha

    Hi Subhashini Kuntala,
    For your issue there are few things to check ...
    1. We need to find exact Printer (new) drivers which matches exactly the (old)  Printer.
    2. Is your cheque is in A4 size or Customised size.
    3. If it is A4 try to print in Other Printer.
    If these senerio's does't work, as a ABAPer You can't do anything else .. So, best to pass this issue to BASIS.
    That could resolve your Problem.
    Regards,
    sg

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

Maybe you are looking for