ME_PROCESS_PO_CUST: Method "POST"

Hi all,
I'm trying to update the 'EKPO', and I will use the BADI 'ME_PROCESS_PO_CUST'.
When you click the 'SAVE' of purchase order, I want to update the 'EKPO-LGORT'. and I will try to use method 'POST'.But the method 'POST' has only 'IM_HEADER'.
Now I don't know how to upate the EKPO-LGORT using method 'IM_HEADER' in 'POST'.
Can someone help me!!
By Soma

Hai Tomoyuki,
The PROCESS_ITEM method has only IMPORTING parameter, meaning that you cannot change the values in the IM_ITEM parameter.
Use ls_mepoitem = im_item->get_data( ).
and chage your item date. Please read the documentation you can change only some set of data at item level.
Then use im_item->set_data( ).
Also You can refer these links...
ME_PROCESS_PO_CUST: Method "POST"
Implementing BADI's ME_PROCESS_PO_CUST
BADI ME_PROCESS_PO_CUST - FIELDSELECTION_ITEM
Regards,
Srikanth.

Similar Messages

  • BADI ME_PROCESS_PO_CUST Method Post

    Hi, how can we know in the method post of the BADI ME_PROCESS_PO_CUST if we are in creation mode (me21n) or change mode (me22n), I need to do some coding only at the creation of the PO but this method is call anytime we click save!
    thanks!

    Hello Alexandre
    It would be possible to check the transaction. However, if the BAPI BAPI_PO_CREATE is used the BAdI is also processed yet the transaction is most likely wrong.
    An <u>unambigous </u>approach is to check IMPORTING parameter IM_TRTYP in method IF_EX_ME_PROCESS_PO_CUST~OPEN:
    METHOD if_ex_me_process_po_cust~open.
    * define local data
      DATA:
        lo_po          TYPE REF TO cl_po_header_handle_mm,
        ls_header      TYPE mepoheader.
      me->md_trtyp = im_trtyp.  " save transaction type
      IF ( im_trtyp = 'H' ).  " add new purchase order
    I would add an instance attribute MD_TRTYP to the BAdI implementing class and save the transaction type in method IF_EX_ME_PROCESS_PO_CUST~OPEN (see above).
    Now you can simply add the following IF condition to your POST method:
    METHOD if_ex_me_process_po_cust~open.
      CASE me->md_trtyp. 
        WHEN 'H'.    " add new purchase order
      ...  " do required action for CREATE
        WHEN ... .
        WHEN others.
      ENDCASE.
    The possible transaction types can be found at: im_trtyp -> data element -> <b>domain </b>(fixed values).
    Regards
      Uwe

  • ME_PROCESS_PO_CUST - Need Help on Methods POST, PROCESS_HEADER

    Hi,
    I will explain the requirement and my approach and the problem i am facing.
    During save of Purchase order, a confirm popup should be shown and according to the user confirmation, it will hit a Z Field in CI_EKKODB.
    For this, i implemented the solution in BADI ME_PROCESS_PO_CUST and Method POST. Even though i use SET_DATA to set the data, it never updates the database table.
    For testing purpose, i put the code in Method PROCESS_HEADER, the SET_DATA worked fine and it finally updated the database table. So, I thought of implementing the solution here by checking sy-ucomm and executing only during SAVE of PO. But here my problem is, Not always all the time this PROCESS_HEADER method executes. For example, If you change any header data and Press "Enter", then the "PROCESS_HEADER" is called. and then immediately without changing any data and you Press "SAVE", the Method PROCESS_HEADER will not be called.
    Could you please anyone suggest me either how to forcefully call the PROCESS_HEADER method everytime or is there any other way to set the Z Data into the database table.
    Thank you in advance.
    Karthik

    I have the same issue. Do you know how you solved ths issue? if so can you please post the reply. Thanks

  • OC4J Form method="post" don't working

    Hello!
    I have a J2EE Application with Servlets and jsp's, with OC4J v.10.1.3 installed in my computer, with one page called index.jsp with this code:
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@page import="java.util.Enumeration"%>
    <%
    String auth = request.getHeader("Authorization");
    String usuario = "";
    if (auth == null) {
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM");
    return;
    if (auth.startsWith("NTLM ")) {
    byte[] msg =
    new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
    int off = 0, length, offset;
    if (msg[8] == 1) {
    off = 18;
    byte z = 0;
    byte[] msg1 =
    {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
    (byte)'S', (byte)'P', z,
    (byte)2, z, z, z, z, z, z, z,
    (byte)40, z, z, z, (byte)1, (byte)130, z, z,
    z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
    z, z, z, z, z, z, z, z};
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM "
    + new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
    return;
    else if (msg[8] == 3) {
    off = 30;
    length = msg[off+17]*256 + msg[off+16];
    offset = msg[off+19]*256 + msg[off+18];
    usuario = new String(msg, offset, length);
    //out.println(s + " ");
    else
    return;
    length = msg[off+1]*256 + msg[off];
    offset = msg[off+3]*256 + msg[off+2];
    usuario = new String(msg, offset, length);
    //out.println(s + " ");
    length = msg[off+9]*256 + msg[off+8];
    offset = msg[off+11]*256 + msg[off+10];
    usuario = new String(msg, offset, length);
    usuario = usuario.replaceAll(" ", "");
    usuario = usuario.trim();
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script type="text/javascript">
         function enviarForm() {
              document.frmLogin.submit();
              return true;
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Mapfre Asistencia</title>
    </head>
    <body onload="javascript:enviarForm();return true">
    <form name="frmLogin" method="post" action="/mapfre_content/ConectorOCDB" enctype="application/x-www-form-urlencoded; charset=UTF-8">
    <%
         Enumeration num = request.getParameterNames();
         while (num.hasMoreElements()) {
              String param = (String) num.nextElement();
              String valor = request.getParameter(param);
              request.getSession().setAttribute(param, valor);
    %>
    <input type="hidden" name="<%=param%>" value="<%=valor%>"/>
    <% } %>
    <input type="hidden" name="user" value="<%=usuario%>"/>
    </form>
    </body>
    </html>
    The first part is to obtain the Windows username and last, the part to generate the form dinamically, because the number of parameters may vary, well, all works perfectly but when I send the form to the Servlet, the parameters value appears as NULL.
    Curiosly, the parameters arrives well if I change the form method to GET, ¿what's wrong with this code or with the server configuration?
    Thank You!!

    set the form to multipart/form-data (required for file uploads, as a little research could have told you) and use Apache FileUpload to parse the request.

  • ERROR RENDERING PDF IN SERVLET WITH FORM method="post"

    Hello,
    we are trying to render a dinamic PDF document in a servlet building with XSL:FO apache or itext.
    The problem ocurs when we sending a Form data with method post, the output of the servlet is a blank page instead of the pdf document. Also if we send the form data with method "get" we can view the pdf document corretly.
    But we need to send amount information, and can?t use method get.
    Thank

    You can always use GET to send information by generating a dynamic URL in the query string (after the '?'). Granted, you don't want to send file data that way, but it will work for small numbers of arguments where privacy is not a concern.
    As to why you see the PDF in one instance and not another, I'm not sure. There is no difference from an HTTP standpoint. You sent a request, you are getting a response. The browser should treat the response the same, regardless of GET vs POST.
    Are you setting the content-type to application/pdf? Are you doing something fishy with Javascript? Do you have conditional logic in your code that fires on a POST but not on a GET that actually has a bug in it (since GET works but it was designed for POST)?
    - Saish
    "My karma ran over your dogma." - Anon

  • How to use method POST to send XML using utl_http?

    Hi,
    I am trying to work out how to use the POST method to mimic submitting data from a HTML form, using utl_http.
    I cannot use SOAP for this as the people I am sending the data to are just expecting an XML document to be sent to a standard CGI script running on their web server.
    There is a lot of documentation on how to submit data using the POST method (using Utl_Http.Write_Text etc), but I cannot find anything that tells me how to submit form variables.
    The examples on OTN say this:
    "Alternatively use method => 'POST' and Utl_Http.Write_Text to
    build an arbitrarily long message"
    but don't tell me how to actually place the data into the required input parameters of the CGI program I am hitting.
    I need to hit a URL such as
    www.asite.com/cgiprogram
    and pass in a parameter, eg
    in_param="test+data"
    I am currently doing this as a GET, which works, but the XML document I am passing in could potentially be bigger than the GET method will allow.
    Any help would be greatly appreciated.
    Thanks,
    Leon.

    Please try the PL/SQl forum

  • Method post and encrypt problem--FORM

    Hello,
    In the form I have some text fields and one field which takes input as file.
    Now I have set method = post and enctype="multipart/form-data" for a form.
    Now when I submit the form the input = text fields are shown as null since I am using enctype="multipart/form-data".
    I have to use enctype="multipart/form-data" since I have to send a file.
    I dont understand how to solve this problem.
    Thanks
    Aniketh

    I am using the same library for file upload.
    There are some input type as text and one input type as file.For input type file I have use enctype="multipart/form-data".
    As I explained above if I use the form parameter enctype="multipart/form-data" only then the file will be uploaded but the other text inputs (which I read as request.getParameter("name"))comes out to be null.
    Please help me out

  • Method Post

    Hi to evrtybody, I'm new here.
    I have a problem with method post:
    I have a webapp that shows filter and report pages, I generate it with XHTML, through my Servlet.
    For example when I get back at previous page, from my report page; that one results expired; so I have to refresh it.
    I don't think that the problem consists in the set filter datas again, but probably in some browser configuration.
    I'm sure to find many answers and to improve my java knowledge.
    Thanks in advance.

    Usually, with content returned to the user's browser with the POST method, this occurs regularly. It would be asking too much to consider a scheme where the objects that you need information from (such as the objects used to create your dynamic XHTML stuff in the servlet) be available in a greater web application context, such as the user's session or even the application context. If, for example, you used Struts as your framework, you would be much better off.

  • Method POST of the HTTP

    Hello,
    I'm using a CSS11501 with 7.30.00 software version.
    During the work sessions, users must fillfull a virtual shop cart, so they use the method POST.
    From the servers logs, I have found that the css passes to the servers only the url and no the content sent by users. So the requests fail.
    If I remove the css from the system, the servers work properly.
    Is it caused by a bug of the software version css is using? How can I resolve it?
    Thanks.
    Regards
    Bye

    Would you happen to be doing a redirect of the HTTP POST? Such as to HTTPS or another HTTP url. I found that when an HTTP POST is redirected the client changes to an HTTP GET when sending to the new URL.
    If you are redirecting, look at the forum post below:
    Content Networking
    CSM redirect problem: http to https (http post changed to get)
    Hope this helps,
    Mark

  • Form method=post - Nevermind, I fixed it.

    I have a weird problem.
    If I make the form method=get, then everything works fine when I submit the form. However, when I make form method=post, I get this error message when I try to submit the form:
    Your request cannot be completed. The server got the following error:
    javax.servlet.jsp.JspTagException
    Does anyone have any idea why this would happen?
    Thanks for your time. Any help is greatly appreciated.
    Message was edited by:
    user449101

    Nevermind, I found my problem.

  • NavigateToURL where URLRequest method = POST always defaults to GET

    Hi there
    I'm trying to invoke a PHP URL using the HTTP POST method combined with parameters to pass to a form. The test app is an AIR application as per the code below. Whilst the default browser is launched with the URL specified, my issue is that the method used at runtime is always HTTP GET not POST. I'm not sure what I'm doing wrong. I'd be really grateful if somebody could review and point out my mistake!
    Many thanks
    Ed
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    import flash.net.navigateToURL;
      private function newWin(url:String):void {
                    var urlRequest:URLRequest = new URLRequest(url);
    var variables:URLVariables = new URLVariables();
        var rhArray:Array = new Array(new URLRequestHeader("Content-Type", "text/html"));
    urlRequest.requestHeaders = rhArray;
                variables.username = "admin";
                variables.password = "admin";
                variables.domain   = "Default";
                urlRequest.data = variables;               
    urlRequest.method = "POST";
                    navigateToURL(urlRequest);
    private function buttonclick() : void
    this.newWin("http://10.0.5.176/contactq/index.php");
    ]]>
    </mx:Script>
    <mx:Canvas id = "myCanvas" height="400" width="400">
    <mx:Button id="myButton" click="buttonclick();" x="169" y="166" width="91" label="Invoke URL"/>
    </mx:Canvas>
    </mx:WindowedApplication>

    Firefox stores certificates that a server sends automatically in cert8.db for easier access, but that can also cause conflict if servers sends a certificate that is already stored.

  • Defining container for BO FIPP method POST

    Hi Experts,
    New to workflow, we are creating a program that instantiate BO FIPP method POST, how to create container for this fields?
    object-key-documentno. object-key-sourcecompanycode. object-key-fiscalyear.
    We will populate this from parameters.
    Thanks!

    Hi John
    I am not sure if I got your requirement clearly, but if you are trying to call the processing of POST method of FIPP via a stand alone ABAP code, you can use the following:
    Call FM SWO_CREATE where objtype = 'FIPP' and objkey = concatenated string of Doc No, Source Company Code and Fiscal year (including spaces and/or leading zeros ... iam assuming that you have this key in your ABAP program)
    You will get the FIPP object Reference in parameter "object"
    Now using this reference, call FM SWO_INVOKE  where Access = 'C' (that is, call a method......if you need to read an attribute, you can make this as 'G'), Object = the object reference from above call to SWO_CREATE and VERB = 'POST' (if left blank, the default method of the BO is called for access 'C' and for access 'G', the default attribute is returned if no value is given). Pass any method data in "container".
    Hope this is what you were looking for....if not... please elaborate on your requirement.
    Regards,
    Modak

  • Method POST no Allowed error. See my code, please.

    What happend here?.
    At submit the form I see the next error:
    Method Not Allowed
    The requested method POST is not allowed for the URL filesend.jsp.
    Thanks.
    **** filesend.jsp file ******
    <%
    if (request.getParameter("fichero")==null)
    %>
    <html>
    <head>
    <title>How send a file</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" enctype="multipart/form-data" method="post" action="filesend.jsp">
    <input type="file" name="fichero">
    <input type="submit">
    </form>
    </body>
    </html>
    <%
    else
    // Here the code for load the data after post submit
    %>

    Your web server must be told that this kind of page (.jsp) can accept the POST method (default is GET only). It is not an error in the code. Talk to your server admin.

  • OAM - Method POST Not Allowed

    Hi,
    I have OAM setup with WebLogic Server using OHS as a Webserver. I am not complete yet but just to check I have created a sample login page which will be prompted (Or user wil be redirected) when I will try to access a resource (WebPage) hosted on WLS. I have created this page in 'Orahome_2/Apache/htdocs/login.html'. I can access this page manually on 'http://IP_ADDRESS:PORT/login.html' as following;
    >
    <html>
    <head>
    <title>T24 SSO Login</title>
    <script language="JavaScript">
    function submitForm() {
    document.forms[0].submit();
    </script>
    </head>
    <body bgcolor="#ffffff" onLoad="self.focus();document.loginform.login.focus()">
    <center>
    <h2>T24 SSO Login</h2>
    <form name="loginform" action="/webgateaccess/oblix/apps/webgate/bin/webgate.dll" method="post">
    <table cellspacing="0" cellpadding="0" border="0">
    <tr><td valign="center" align="left"><b>Username</b></td>
    <td>    </td><td valign="center" align="left">
    <input type="username" name="userid" size="20" value=""></td>
    </tr>
    <tr>
    <td valign="center" align="left"><b>Password</b></td>
    <td>    </td><td valign="center" align="left">
    <input type="password" name="password" size="20" value=""></td>
    </tr>
    </table>
    <input type=submit id=submit name=submit value=submit />
    </form>
    </body>
    </html>
    When I Press Submit I Get Following Error On Page_
    Method Not Allowed
    The requested method POST is not allowed for the URL /webgateaccess/oblix/apps/webgate/bin/webgate.dll.
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at ukdsk-hpoplaw.europe.temenosgroup.com Port 7777
    What could be the possible reason???
    Thanks,
    Sjunejo
    Edited by: Sheeraz Junejo on 05-Oct-2009 13:30

    Hi Miller,
    I am using '/webgateaccess/oblix' because there is already an alias which is pointing towards access server installation directory and it was completely failing by giving an error message that 'File not found on server' and there was no file even directory called webgate inside access server installation. So I declare one more alai called webgateaccess/oblix and point it towards the 'Webgate/access/oblix' which has 'apps/common/webgate/bin/webgate.dll' file and that what we are lokkiing for is it???
    Yes at this point both of my defaul Policy domains were not enabled so I enabled it but its still giving me the same error message. could you please post a link for Form based authentication tips.
    Finally, I was searching and had this comment that this error can be ommit out by providing a +Execcgi rights to this directory or file explicitly using following xml (Something like);
    <Location /webgateaccess/oblix/apps/common/webgate/bin>
    Options +Execgi
    Order Allow,deny
    Allow from all
    </Location>
    Is it???
    Thanks,
    Sjunejo

  • Binding ArrayCollection to HTTPService method="POST" xml result

    Hi All,
    Firstly apologies for posting all this code!
    I have the following app that adds & displays in a
    datagrid the data from a mysql db, works fine so far.
    #########################<START
    SNIP>##########################
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*" layout="absolute"
    backgroundGradientColors="[#0080ff,#80ffff]"
    creationComplete="send_data()">
    <!-- This is the Script to SetUp Functions-->
    <mx:Script>
    <![CDATA[
    private function youveClicked():void {
    mx.controls.Alert.show('You Clicked!!!');
    private function send_data():void {
    staffcodeRequest.send();
    ]]>
    </mx:Script>
    <!-- This is the HTTPService-->
    <mx:HTTPService id="staffcodeRequest" url="
    http://192.168.0.84/amfphp/services/staffcode.php"
    useProxy="false" method="POST">
    <mx:request xmlns="">
    <firstname>{firstname.text}</firstname><surname>{surname.text}</surname><staffcode>{staff code.text}</staffcode><emailaddress>{emailaddress.text}</emailaddress><department>{departm ent.text}</department>
    </mx:request>
    </mx:HTTPService>
    ###########################<END
    SNIP>##########################
    I'm thinking of Binding the the xml formated results into an
    arrayCollection & then use the filterFunction to allow a user
    to filter the data (is this possible?).
    (Below is some code that I found in a thread & am using
    to work from as an example)
    #########################<START
    SNIP>##########################
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical" creationComplete="initData()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    private var dataList:ArrayCollection ;
    private function initData():void{
    dataList= new ArrayCollection([
    {name:"school A", city:"Dartford"},
    {name:"school B", city:"Pomona "},
    {name:"School C", city:"Phillipsburg"}
    private function filterDemo():void{
    dataList.filterFunction = searchDemo;
    dataList.refresh();
    private function searchDemo(item:Object):Boolean{
    var isMatch:Boolean = false
    if(item.name.toLowerCase().search(search.text.toLowerCase())
    != -1){
    isMatch = true
    return isMatch;
    private function clearSearch():void{
    dataList.filterFunction = null;
    dataList.refresh();
    search.text = '';
    ]]>
    </mx:Script>
    ###########################<END
    SNIP>##########################
    If it is possible, I need some help in integrating the
    following code, (I've tried but keep getting {1151: A conflict
    exists with definition staffcodeRequest in namespace internal.})
    #########################<START
    SNIP>##########################
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*" layout="absolute"
    backgroundGradientColors="[#0080ff,#80ffff]"
    creationComplete="send_data()">
    <!-- This is the Script to SetUp Functions-->
    <mx:Script>
    <![CDATA[
    private function youveClicked():void {
    mx.controls.Alert.show('You Clicked!!!');
    private function send_data():void {
    staffcodeRequest.send();
    <!--Can I just Bind the arrayCollection here-->
    import mx.collections.ArrayCollection;
    [Bindable]
    private var staffcodeRequest:ArrayCollection;
    private function filterDemo():void{
    staffcodeRequest.filterFunction = searchDemo;
    staffcodeRequest.refresh();
    private function searchDemo(item:Object):Boolean{
    var isMatch:Boolean = false
    if(item.staffcode.toLowerCase().search(search.text.toLowerCase())
    != -1){
    isMatch = true}
    return isMatch;
    private function clearSearch():void{
    staffcodeRequest.filterFunction = null;
    staffcodeRequest.refresh();
    search.text = '';
    ]]>
    </mx:Script>
    <!-- This is the HTTPService-->
    <mx:HTTPService id="staffcodeRequest" url="
    http://192.168.0.84/amfphp/services/staffcode.php"
    useProxy="false" method="POST">
    <mx:request xmlns="">
    <firstname>{firstname.text}</firstname><surname>{surname.text}</surname><staffcode>{staff code.text}</staffcode><emailaddress>{emailaddress.text}</emailaddress><department>{departm ent.text}</department>
    </mx:request>
    </mx:HTTPService>
    ###########################<END
    SNIP>##########################
    What I am strugling with is BINDING the returned xml formated
    results to an arrayCollection, and changing from the static xml
    file example to mxl formated txt received from the mysql db on the
    fly.
    Help would be grate ;-)
    TIA
    Danny

    From what I've read, it seems that a Proxy Server, such as
    BlazeDS or FDS, is required if you want to use anything other than
    GET or POST and set the useProxy property to true.
    What is the motivation of requiring a proxy server to support
    HTTP PUT or DELETE?

Maybe you are looking for