How to set Custom screen in ME21N when Payment Terms as particular value ?

Dear ABAP Experts,
                                     I created one Custom Tab under Header level in me21n using screen exit MM06E005.
                 It's working fine. but  My requirement is, whenever  user will select Payment term as '0001' in Delivery / Invoice Tab then my Custom tab will open in ME21N t-code . My Custom tab will have different input fields which are entered manually, those values will store in Custom table(Z-table) when the user  press save button.
So, How to do this?

Hi,
The ME2xN transactions reads the user settings from table ESDUS using function module ES_READ_USER_SETTINGS, and save them at the end of the transaction using function module ES_APPEND_USER_SETTINGS.
You need to overwrite the displayed header tab number using  ES_APPEND_USER_SETTINGS just at the beginning of the transaction. I think that a godd point to do this is in the subroutine INIT_TRANSACTION of report RM_MEPO_GUI. You can do this using the enhacement framework. I have tested it and it works for me. This is the code you should insert:
FORM init_transaction CHANGING ch_document        TYPE mepo_document
                               ch_exit            TYPE mmpur_bool
                               ch_requisitions    TYPE mereq_t_eban_mem
                               ch_requisition_acc TYPE mereq_t_ebkn.
"""""""""""""""""""""""""""""$"$\SE:(1 ) Forma INIT_TRANSACTION, Inicio                                                                                D
*$*$-Start: (1 )-----------------------------$*$*
ENHANCEMENT 1  ZTEST.    "active version
*Expand header------
    CALL FUNCTION 'ES_APPEND_USER_SETTINGS'
      EXPORTING
        iaction  = 'PurchaseOrder'
        ielement = 'DYN_4000-BUTTON     TOGGLE_STATE'
        iactive  = '2'.
*Move to 2nd tab ----
    CALL FUNCTION 'ES_APPEND_USER_SETTINGS'
      EXPORTING
        iaction  = 'PurchaseOrder'
        ielement = 'HEADER-TABSTRIP     SUBVIEW_INDEX'
        iactive  = '2'.
ENDENHANCEMENT.
*$*$-End:   (1 )-----------------------------$*$*
  DATA: l_ebeln  TYPE ekko-ebeln,
        l_ebelp  TYPE ekpo-ebelp,

Similar Messages

  • How to set disable screen-capture-recorder when us...

    i did a skype call w/someone some months back; i don't have a webcam, but the person saw that i was on their fb page and it totally threw me off, it felt like i was stalkign that person the way he came at me with it.  some how screen sharing was on and it was showing my desktop which showed that i had fb open to this person's page.  I felt so violated, i did not want this nor did i set it up.  AT the time i had windows 7, now i have 8.1 and have forgotten how i was able to turn it off, anyone know of how i can disable this in 8.1?? 

    Hi,
    The ME2xN transactions reads the user settings from table ESDUS using function module ES_READ_USER_SETTINGS, and save them at the end of the transaction using function module ES_APPEND_USER_SETTINGS.
    You need to overwrite the displayed header tab number using  ES_APPEND_USER_SETTINGS just at the beginning of the transaction. I think that a godd point to do this is in the subroutine INIT_TRANSACTION of report RM_MEPO_GUI. You can do this using the enhacement framework. I have tested it and it works for me. This is the code you should insert:
    FORM init_transaction CHANGING ch_document        TYPE mepo_document
                                   ch_exit            TYPE mmpur_bool
                                   ch_requisitions    TYPE mereq_t_eban_mem
                                   ch_requisition_acc TYPE mereq_t_ebkn.
    """""""""""""""""""""""""""""$"$\SE:(1 ) Forma INIT_TRANSACTION, Inicio                                                                                D
    *$*$-Start: (1 )-----------------------------$*$*
    ENHANCEMENT 1  ZTEST.    "active version
    *Expand header------
        CALL FUNCTION 'ES_APPEND_USER_SETTINGS'
          EXPORTING
            iaction  = 'PurchaseOrder'
            ielement = 'DYN_4000-BUTTON     TOGGLE_STATE'
            iactive  = '2'.
    *Move to 2nd tab ----
        CALL FUNCTION 'ES_APPEND_USER_SETTINGS'
          EXPORTING
            iaction  = 'PurchaseOrder'
            ielement = 'HEADER-TABSTRIP     SUBVIEW_INDEX'
            iactive  = '2'.
    ENDENHANCEMENT.
    *$*$-End:   (1 )-----------------------------$*$*
      DATA: l_ebeln  TYPE ekko-ebeln,
            l_ebelp  TYPE ekpo-ebelp,

  • How to set a field as mandatory when another field contains specific values

    Hi SAP Experts,
    Is it possible to set the Plant Specific Material Status field as mandatory when the DChain-spec. status field contains a specific set of values? Thanks.
    Regards,
    Kim Yong

    Hi Kim,
        I think you can achieve this using the validation tab in the field.Add a new rule for validation select the condition as test and in the value you have use formula according to your senario.Select the 'Stop execution'.This will make the field mandatory.
    I hope this helps...
    Naga

  • How to set my own gui status when i use selection-screen

    how to set my own gui status when i use selection-screen command
    and
    how to set the names in the application tool bar when function keys are created

    Make sure that you do this in event "AT SELECTION-SCREEN OUTPUT".
    Run Txn ABAPDOCU and check 'DEMO_SEL_SCREEN_STATUS' for sample.
    Also check out following discussion -
    Selection Screen PF-STATUS
    Cheers,
    Sanjeev

  • I want to be able to monitor my teen daughter's computer from home using screen sharing.  Anyone know how to set up screen sharing when my daughter's school has her computer set up for Apple Remote Desktop?

    I want to be able to monitor my teen daughter's computer from home using screen sharing.  Anyone know how to set up screen sharing when my daughter's school has her computer set up for Apple Remote Desktop? 

    ARD won't be as smooth as you think  over the Internet and be a security risk for your daughter.
    Your best bet would be to install nannyware, then when she's asleep you can review the logs.
    This is the best and Mac friendly
    http://www.internetsafety.com/

  • How to set selection screen

    I have a question that ...
    i have 2 options --
    when select 1st option , show group1 screen
    when select 2nd option, show group2 screen
    like the follow ..which is pretty work!....but i have another question that how to set the screen field ..
    my question is that if i select group1 screen...i want to set
    if S1_EBELN = '' and S1_IHREZ = ''.
        message e398 with 'pls input one of these two options!'.
      elseif S1_EBELN ne '' and S1_IHREZ ne ''.
        message e398 with 'Only one of these two options input is allowed!'.
      endif.
    i've tried to insert these statement within the LOOP...but not work ......
    so can anyone know how to set?
    PARAMETERS:
    R1 RADIOBUTTON GROUP OPT1 USER-COMMAND R DEFAULT 'X'.
    PARAMETERS:
    R2 RADIOBUTTON GROUP OPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC. 
    SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC . 
    SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .  
    SELECTION-SCREEN END OF BLOCK RPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
    SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.   
    SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .   
    SELECTION-SCREEN END OF BLOCK RPT2.
    IF R1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'DEF'.
            screen-input = '1'.
            SCREEN-required = '1'.
            SCREEN-INVISIBLE = '1'.
            screen-input = '0'.
            screen-output = '1'.
            screen-active = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    ELSEIF R2 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'ABC' .
            screen-active = '0'.
            screen-input = '0'.
            screen-output = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

    Modified ur code .
    tables : ekko, mkpf.
    PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
    PARAMETERS : R2 RADIOBUTTON GROUP RG .
    SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC.
    SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC .
    SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .
    SELECTION-SCREEN END OF BLOCK RPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
    SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.
    SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .
    SELECTION-SCREEN END OF BLOCK RPT2.
    at selection-screen output.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'DEF' .
    screen-active = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'ABC' .
    screen-active = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    at selection-screen .
    if r1 = 'X'.
    if s1_ebeln[] is initial and s1_ihrez[] is initial..
    message e001(zxx) with 'pls input one of these two options!'.
    endif.
    if NOT s1_ebeln[] IS initial.
    IF NOT s1_ihrez[] IS INITIAL.
    message e001(zxx) with 'only one entry in Ebeln or Ihrez is
    allowed'.
    ENDIF.
    ENDIF.
    endif.
    START-OF-SELECTION.
    WRITE:/ 'hi'.
    ***add on
    split the text into two texts .
    <b>if NOT s1_ebeln[] IS initial.
    IF NOT s1_ihrez[] IS INITIAL.
    message e001(zxx) with text-001 text-002.
    *'only one entry in Ebeln   = text-001
    or Ihrez is allowed'.       = text-002.</b> 
    regards,
    vijay

  • CR 2008 SDK: how to set custom paper size?

    Dear forum users, I'm trying to use Crystal Reports 2008 SDK to print barcode labels to a Datamax Printer.
    The printer uses a custom page size. Can anyone tell me how to set custom page size and margins using C# and CR2008 SDK?
    Best regards
    Alessandro

    I'm experiencing this problem: I need to print barcode labels which are 4 x 9 cm each (a custom paper size). The report has been build correctly, orientation is right but when I print the labels programmatically by an application I made the label gets printed in a wrong way.
    In particular, orientation and paper size are not correct.
    So I would like to try to force both of them (both the orientation and the custom paper size). How can I do that?
    Best regards
    Alessandro

  • How to set custom font family in qml label in black berry 10 os

    how to set custom font family in label text  qml in black berry 10 OS

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • How to set custom master page for social/sites.aspx in sharepoint 2013

    How to set custom master page for social/sites.aspx in sharepoint 2013.?
    File path is
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx
    Thanks in advance

    Hi,
    You could open the sites.aspx in Notepad or SharePoint designer, and set the master page to your own master page directly via editing:
    <%@ Page language="C#" MasterPageFile="~masterurl/custom.master"      Inherits="Microsoft.SharePoint.Portal.WebControls.FollowedContentWebPartPage,Microsoft.SharePoint.Portal,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
    %>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to set custom size of Close Button e.g. 32x32  of Title Window in Flex 4

    How to set custom size of Close Button e.g. 32x32 of Title Window in Flex 4?

    Hi
    Here is the code of the Button in the skin class of spark title window.
    <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
                              width="15" height="15" right="7" top="7" />
    So first change the default height and width from 15 to 32. Then in the Button Skin class i.e. spark.skins.spark.TitleWindowCloseButtonSkin change paths to modify the cross symbol.
    Hope this helps
    Rush-me

  • How to set the screen size with nested Iview screen

    Can someone show me how to set the screen size with nested IView  screen.
    at the moment i only try it with trial and error untill it looks somewhat close. Is there a property in VC to set the size for Height and width.
    The same question is for the form. the form elements inside the form is easy but the actual form is still a challenge.

    Hi,
    Yes you are correct ,Still the Form and iview are not able to change thier Layout Structure using a Propery.
    it is available with VC7.1
    Govindu

  • HT5312 How to set a rescue email address when I already have an Apple ID and I forgot my security questions

    How to set a rescue email address when I already have an Apple ID. Actually I forgot my security questions.

    You won't be able to add one until you can answer your questions, you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • How to set full screen camera on ios 8 on iphone5s

    How to set full screen camera on iphone 5s having an ios8

    HI,
    Give the width in % instead of mentioning in pixels.
    ie. for full width, give 100%.
    Make sure the layout is GridLayout.
    Regards
    Fahad Hamsa

  • How to set change number is prerequisite when change BOM?

    Dear SAP Experts,
    I have actived EC management  in BOM control data in IMG. But when i changed
    BOM ( the code  CS02 )  with change number blank, system had not given an error message. SO,how to set change number is prerequisite when change BOMs?
    Thanks...
    Regards,
    Joey.

    Just a guess: Transaction os27 and change the number range to external.
    Matthias

  • How to set Custom HTTP headers in HTTP binding?

    How to set custom HTTP headers before sending the Rest based request in HTTP binding?

    sharon38_74 wrote:
    they said that our internal application needs to send a "login request" to etran via SSL with the user's information encoded in base 64 format. etran captures the HTTP header containing user authentication and authorization information, and parses the required information from the HTTP header.
    My question is that how I set user information in HTTP header? From my understanding, once I am able to set the user information in HTTP header, it is in base 64 format?Your application need to act like a proxy. You can invoke a HTTP request programmatically using java.net.URLConnection. You can set request headers using URLConnection#setRequestProperty(). Also see the API docs: [http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html]. You only need to know the header field name where to set the Base64-encoded value in. You need to Base64-encode the value yourself.

Maybe you are looking for

  • Monitor Entry in transformation routine does not appear

    Hi folks, I have a transformation rule (from dso to cube) which is using an abap routine. In this routine i try to enter log messages the monitor. However I do not know where to find the log messages. They do not appear in the monitor. This is my cod

  • Powerbook fails to startup after Safari, Java, QT Updates

    I have a 15" Powerbook G4 with OS X.4.2 and just ran software update, while connected to the power supply - it is not running on battery power. After installing the QuickTime, Java, and Safari updates (it has been away from a network for a while) I g

  • Clearing Cache on Mac - Side Effects?

    Hello again, I'm on a Mac that was purchased by the University that I work for.  They've installed the Adobe Suite for me and when there are updates, I actually have to have them "push" them to me - which I've learned to live with. I'm familiar with

  • TS1398 wifi greyed out? How do I fix this?

    loads of different "solutions" but none work.... Has apple solved this yet?

  • New Training Client - how to build?

    We have a training client (3 yrs old) with training exercises, training users etc. We need to build a new training client based on the config. of our live system but minus the live data. We will then need to get the exercises etc. back onto new clien