Rewrite value in BKPF when FI document posting

Hello!
I need your advice. I have task - Сlear field XREF2_HD in table BKPF when FI document is posting  (FB01, for excemple).
I`m using BTE 1120 "Substitute header and items", belong you can see FM code which i use:
FUNCTION ZSAMPLE_PROCESS_00001120.
""Локальный интерфейс:
*"  IMPORTING
*"     VALUE(I_BKDF) TYPE  BKDF OPTIONAL
*"  TABLES
*"      T_BKPF STRUCTURE  BKPF
*"      T_BSEG STRUCTURE  BSEG
*"      T_BKPFSUB STRUCTURE  BKPF_SUBST
*"      T_BSEGSUB STRUCTURE  BSEG_SUBST
*"      T_BSEC STRUCTURE  BSEC OPTIONAL
*"  CHANGING
*"     REFERENCE(I_BKDFSUB) TYPE  BKDF_SUBST OPTIONAL
BREAK-POINT.
LOOP AT T_BKPF.
T_BKPF-XREF2_HD = '!!!!'.
MODIFY T_BKPF INDEX SY-TABIX.
ENDLOOP.
ENDFUNCTION.
But after execute this FM, all changes in T_BKPF are rollbacked (it`s OK, becouse after execute T_BKPF is rewrited from local table L_BKPF).
I think, i should i change data in T_BKPFSUB table, but field XREF2_HD is`t included into BKPF_SUBST structure. So, i have two questons:
1. How i can add field XREF2_HD into BKPF_SUBST?
2. What can i do?
The best regreades, DrAlex

You are right, using a where-used option on OPEN_FI_PERFORM_00001120_P, display a MOVE-CORRESPONDING from BKPF_SUBST to XBKPF internal table.
It does not seem to exist any point to enhance this structure in standard, you may append fields to this structure that should update BKPF (creating append ZABKPF_SUBST) but that may cause inconsistencies in other database tables, you could try to use a substitution rule (OBBH) and not the BTE to fulfil your requirement.
Regards,
Raymond

Similar Messages

  • Exit or Badi for FB01 to update KMNAM filed value to BKPF free field

    Hi Experts,
    Please provide me the correct Exits or Badi for to update KMKPF-KMNAM value to BKPF reference field while posting FB01.
    I tired with substitution but it was not solved my requirement.
    I have to update the KMNAM value into BKPF-XREF2 field as the user selects account assignment model while posting FB01.
    Please advise and share me, is there any other solution you have.
    Thanks & Regards
    Sankar.

    Hi ,
    These is not exits or badis or BTE are not available eith import paremeters KMKPF.
    So you need to get this value using  Assign statement in any user exit  which contains export parmeter as BKPF .
    ASSIGN ('(SAPLSPO4)KMKPF-KMNAM) TO <fs_KMNAM>.
    I hope this may helpfull..
    Thank you,
    Thanks,
    AMS

  • Picking up wrong segment value during FICA document Posting

    Hi,
    When we are posting any FICA-document manually(FPE1) the segment is getting drived corrcectly for the line items, but issue is happening when the document is getting posted during Invoicing. Everytime it fetchs a default value for segment irrespective of posting area.
    Please suggest.
    Regards,
    Gaurav.

    Event 0081 can be used to populated segments
    Please go through the documentation before you go ahead.

  • Control Document Posting for value range

    Hi All,
    I have requirment in which if a user tries to post a doument via T Codes ( FB01, FB50, FB60, FB70, FBV2 and a custom program which would use BAPI / BDC) and if the total amount of the document ie >999 $, the document should not get posted instead it should get parked and a workflow should be triggered for Approval.
    I think i need to use FIPP~CREATED event to trigger the workflow.
    But is there any FI configuration that i need to do so that the document does not get posted but automatically gets parked if it's value >999 $ and user tries to post it.
    How can I achieve this functionality of not allowing a user to Post but to Park if amount >999$.
    I tried searching BAIDs not able to fnid a suitable BADI.
    What is the functionality of configuration in tcodes OBWA and OBWJ.
    Thanks in advance.
    -Sameer.

    Hi Atif,
    Thanks for the response.
    How can we do this using Exit / BADI?
    Is it that we will have to display an error message to the user that he cannot post the document for the particular amount and will have to select/click the PARK option instead of POST option ?
    Thanks,
    Sameer.

  • #VALUE! displayed when opening Offline documents with BPC logged on

    SITUATION
    The offline documents (by using Park N Go) open fine in Excel, though, when these documents are opened after logging on to BPC, cells display #VALUE! instead. This gives my users a hard time opening distributed reports when they are in BPC session
    DATA
    Macro IS enabled when opening these offline documents
    We are on Office 2007 and BPC 5.1 & BPC 7.0. This particular issue occurs to both versions of BPC
    Please let me know if you have a workaround, or this is a bug? Thank you!
    Sincerely,
    Brian Hsu

    Hi Brian,
    I can suggest you 2 things.
    1. Before doing the offline distribution, go to the template, go to workbook options and select the boxes for expansion and refreshing workbook, when opened / when CV is changed. Save this template and then do the "park n go".
    2. When the saved offline file is opened, this time you should not get #VALUE. If you still get the same values, then go to "park n go" and click on "set to live data and live current view".
    Hope this helps.

  • Trip Co Document posted with value type 11 - Statistical actual

    Dear all,
    Can you please share what caused the CO document posted from Travel Management (tcode: PR05) having value type = 11 Statistical Actual?
    So far all the CO documents posted from Travel Management have value type = 4 - Actual.
    However we have a CO document posted from Travel Management with value type = 11 - statistical actual.
    Question:
    1. What caused the CO document posted with value type = 11?
    2. How to fix/change the value type for this CO document from 11- Statistical to 4 - Actual?
    Thank you very much in advance for your kind assistance.
    Best rgds,
    DTan

    Normally it means that in your CO account assingment there is also another CO object with a higher priority where the real value was posted.  For example if you do account assingment to the Cost Center and Internal order the real object will be Internal order and statistical posting will be at the Cost Center.  Anyway it should be visible within CO document.
    The way to correct it is to reverse and repost, means changing the trip and transferring it again.

  • No document number when some stores posting for cash balancing

    Hi experts,
    I have a problem for SAP SRS(SAP Retail Store) system. Please help me.
    no document number when some stores posting for cash balancing
    thanks.

    Hi,
    For this pls contact with MM consultant or put this query in MM forum.
    Anil

  • When is First FI document posted

    Hi
    i want to know when is the first financial/accounting document posted in the sap system, i think that the first document is posted when we do initial entries with Movement type 561. Which is the prior FI document to this?

    It could be even some manual entries like vendor balance or customer balance or excise balance. other wise 561 is the first movement type used for accounting document
    regards
    Antony

  • Issue: Not getting response when the document is having special chars

    Please help following issue: Not getting response when the document is having special chars(Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    Error message:
    System.FormatException: Invalid length for a Base-64 char array. at
    System.Convert.FromBase64String(String s) at
    Summarize.Summarizer.AccumulateBroadcast(String filedata, String givenWords) in
    c:\DocumentSummarizer\App_Code\Summarizer.cs:line 66
    Code:
    File 1:
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.Properties;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.hwpf.*;
    import org.apache.poi.hwpf.extractor.*;
    import com.lowagie.text.Document;
    import com.lowagie.text.pdf.PRTokeniser;
    import com.lowagie.text.pdf.PdfReader;
    public class DocumentSummarizerClient {
         static Properties loadProperties() {
              Properties prop = new Properties();
              try {
                   prop.load(DocumentSummarizerClient.class.getClassLoader().getResourceAsStream("vep.properties"));
              } catch (Exception ioe) {
                   ioe.printStackTrace();
              return prop;
         public String getSummary(String fileName,String noOfWordsOrPercentage ){
              String summaryInputData ="";
              String summarizedData="";
              String summarizerURL = loadProperties().getProperty("Summarizer.serviceURL");
              try {
                   String fileExtension=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
                   if (fileExtension.equalsIgnoreCase("doc")|| fileExtension.equalsIgnoreCase("txt")|| fileExtension.equalsIgnoreCase("pdf")) {
                                  if (fileExtension.equalsIgnoreCase("txt")) {
                                       BufferedReader bufferedReader = new BufferedReader(
                                                 new FileReader(fileName));
                                       String line = null;
                                       while ((line = bufferedReader.readLine()) != null) {
                                            summaryInputData += line;
                                  if(fileExtension.equalsIgnoreCase("doc")){
                                       POIFSFileSystem fs = null;
                                        fs = new POIFSFileSystem(new FileInputStream(fileName));
                                         HWPFDocument doc = new HWPFDocument(fs);
                                         WordExtractor we = new WordExtractor(doc);
                                         String[] paragraphs = we.getParagraphText();
                                         for( int i=0; i<paragraphs .length; i++ ) {
                                            paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
                                  summaryInputData+= paragraphs[i];
                                  if(fileExtension.equalsIgnoreCase("pdf")){
                                       Document document = new Document();
                   document.open();
                   PdfReader reader = new PdfReader(fileName);
                   int pageCount =reader.getNumberOfPages();
                        for(int i=1;i<=pageCount;i++){
                                  byte[] bytes = reader.getPageContent(i);
                                  PRTokeniser tokenizer = new PRTokeniser(bytes);
                                  StringBuffer buffer = new StringBuffer();
                                  while (tokenizer.nextToken()) {
                                  if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
                                  buffer.append(tokenizer.getStringValue());
                                  summaryInputData += buffer.toString();
                   else{
                        System.out.println("This is Invalid document. Presntly we support only text,word and PDF documents ");
                   // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        // System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
                   else{
                        System.out.println("Data given cannot be summarized further");
                        summarizedData="";
              } catch (FileNotFoundException e) {
                   return("The File is not found \n\n"+e.toString());
              } catch (IOException e) {
                   return("The File is already in use \n\n"+e.toString());
              } catch (Exception e) {
                   return(e.toString());
              return summarizedData;
         public static String postRequest(String parameters,String webServiceURL) throws Exception{
              Properties systemSettings = System.getProperties();
              systemSettings.put("http.proxyHost", loadProperties().getProperty("proxyHost"));
         systemSettings.put("http.proxyPort", loadProperties().getProperty("proxyPort"));
         System.setProperties(systemSettings);
              String responseXML = "";
              try {
                   URL url = new URL(webServiceURL);
                   URLConnection connection = url.openConnection();
                   HttpURLConnection httpConn = (HttpURLConnection) connection;
                   byte[] requestXML = parameters.getBytes();
                   httpConn.setRequestProperty("Content-Length", String
                             .valueOf(requestXML.length));
                   httpConn.setRequestProperty("Content-Type",
                             "application/x-www-form-urlencoded");
                   httpConn.setRequestMethod("POST");
                   httpConn.setDoOutput(true);
                   httpConn.setDoInput(true);
                   OutputStream out = httpConn.getOutputStream();
                   out.write(requestXML, 0, requestXML.length);
                   out.close();
                   InputStreamReader isr = new InputStreamReader(httpConn
                             .getInputStream());
                   BufferedReader br = new BufferedReader(isr);
                   String temp;
                   String tempResponse = "";
                   while ((temp = br.readLine()) != null)
                        tempResponse = tempResponse + temp;
                   responseXML = tempResponse;
                   br.close();
                   isr.close();
              } catch (java.net.MalformedURLException e) {
                   System.out
                             .println("Error in postRequest(): Secure Service Required");
              } catch (Exception e) {
                   System.out.println("Error in postRequest(): " + e.getMessage());
              return responseXML;
         public String replaceVal(String value) {
                   if (value == null) {
                        value = "";
                   value = value.replace("&lt;", "<");
                   value = value.replace("&gt;", ">");
                   value = value.replace("&amp;", "&");
                   return value;
              public static void main(String[] args) {  
                   DocumentSummarizerClient testdoc=new DocumentSummarizerClient();
                   System.out.println("hello");               
                   testdoc.getSummary("C:\\working_folder\\vep\\UnitTestCases\\VEP1.0\\DocumentSummarizerTestData\\TestErrorFour.doc","100%");     
    Note: Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    File 2:
    ---------public class Base64Utils {
    private static byte[] mBase64EncMap, mBase64DecMap;
    * Class initializer. Initializes the Base64 alphabet (specified in RFC-2045).
    static {
    byte[] base64Map = {
    (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F',
    (byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L',
    (byte)'M', (byte)'N', (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
    (byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X',
    (byte)'Y', (byte)'Z',
    (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
    (byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l',
    (byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r',
    (byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x',
    (byte)'y', (byte)'z',
    (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
    (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'};
    mBase64EncMap = base64Map;
    mBase64DecMap = new byte[128];
    for (int i=0; i<mBase64EncMap.length; i++)
    mBase64DecMap[mBase64EncMap[i]] = (byte) i;
    * This class isn't meant to be instantiated.
    private Base64Utils() {
    * Encodes the given byte[] using the Base64-encoding,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the data to be encoded
    * @return the Base64-encoded <var>aData</var>
    * @exception IllegalArgumentException if NULL or empty array is passed
    public static String base64Encode(byte[] aData) {
    if ((aData == null) || (aData.length == 0))
    throw new IllegalArgumentException("Can not encode NULL or empty byte array.");
    byte encodedBuf[] = new byte[((aData.length+2)/3)*4];
    // 3-byte to 4-byte conversion
    int srcIndex, destIndex;
    for (srcIndex=0, destIndex=0; srcIndex < aData.length-2; srcIndex += 3) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+2] >>> 6) & 003 |
    (aData[srcIndex+1] << 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[aData[srcIndex+2] & 077];
    // Convert the last 1 or 2 bytes
    if (srcIndex < aData.length) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    if (srcIndex < aData.length-1) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] << 2) & 077];
    else {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] << 4) & 077];
    // Add padding to the end of encoded data
    while (destIndex < encodedBuf.length) {
    encodedBuf[destIndex] = (byte) '=';
    destIndex++;
    String result = new String(encodedBuf);
    return result;
    * Decodes the given Base64-encoded data,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the Base64-encoded aData.
    * @return the decoded <var>aData</var>.
    * @exception IllegalArgumentException if NULL or empty data is passed
    public static byte[] base64Decode(String aData) {
    if ((aData == null) || (aData.length() == 0))
    throw new IllegalArgumentException("Can not decode NULL or empty string.");
    byte[] data = aData.getBytes();
    // Skip padding from the end of encoded data
    int tail = data.length;
    while (data[tail-1] == '=')
    tail--;
    byte decodedBuf[] = new byte[tail - data.length/4];
    // ASCII-printable to 0-63 conversion
    for (int i = 0; i < data.length; i++)
    data[i] = mBase64DecMap[data[i]];
    // 4-byte to 3-byte conversion
    int srcIndex, destIndex;
    for (srcIndex = 0, destIndex=0; destIndex < decodedBuf.length-2;
    srcIndex += 4, destIndex += 3) {
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    decodedBuf[destIndex+1] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    decodedBuf[destIndex+2] = (byte) ( ((data[srcIndex+2] << 6) & 255) |
    (data[srcIndex+3] & 077) );
    // Handle last 1 or 2 bytes
    if (destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    if (++destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    return decodedBuf;
    issue 2: Exception when passing 2MB .txt file
    Steps to reproduce:
    Call getSummary() with 2MB .txt file
    Actual:
    The following exception has occured:
    1. Error in postRequest(): Unexpected end of file from server
    java.lang.NullPointerException
    Please provide your precious feedback/suggestions.
    Thanks in advance…..
    Edited by: EJP on 15/03/2011 16:52: added code tags. Please use them. Code is unreadable otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for your response….
    This is enhancement project and some one develops long back.
    Regarding point (b) You should be using the java.net.URLEncoder to encode URL parameters, not a base64 encoder.
    DocumentSummarizerClient.java I am using base64
    Ex:
    // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
    Above specific please I need to modify to resolve above issue.
    Could you please suggest me what changes I need to do.
    Waiting for positive response.

  • Clearing document (posting)

    i have purchase order number and invoice number.
    now i need clearing document number . can any body tell me how to get???

    Hi,
      For every accounting document when it is posted it should be available in BKPF Doc header table.. Once that document is closed or cleared..there is any entry made to BSAK for Vendors (Cleared Items) or BSAD for Customers (Cleared Items).
    Eg: When a invoice is generated for a PO it gets created and is still not cleared or is not closed , it makes an entry in BSIK. Once it is closed it is available in BSAK.
    Same is the case with Sales order..
    Regards
    Kiran Sure

  • Automatic clearing for document posted via FBB1 with foreign currency

    Hi SAP Gurus,
    Can anyone help to explain on why does the document posted in FBB1 with document currency USD was auto cleared even without satisfying the rule in OB74. But when the document currency is SGD it can be automatically cleared.
    Scenarion is as below
    OB74 set up:
       Accty type: S
      From acct: 12000
      To account: 12000
      Criterion 1: Business area
      Criterion 2: Assignment
    G/L account : 12000
    Account currency : SGD
    Post JV document via FBB1:
         Dr 12000
         Cr 20000
         Document curreny : USD ; amount: 0
         Local currency: SGD ; amount: 200
         Assignment: Test A
         Business area: 'blank'
    *When I run F.13 above document was cleared and the clearing doc contains below
           Dr 20000
           Cr 12000
    But when I post in FBB1 with same entries as above, only changing the document currency to SGD it will not be cleared via F.13.
    Appreciate your explanation on why does above scenario happened.
    Thank you in advance.

    HI,
    while posting the entry through FBB1 then system will not consider the exchange rates as per ob08 and etc.,
    you can define the local and foreign currency values as per your wish while posting the FBB1.
    I hope above will clear you issue. Thank you.
    Reg
    Madhu M

  • BAPI_ACC_INVOICE_RECEIPT_POST document posted succ but not in FB03 -urg

    Hi
    For the Inter-company G/L Account posting (Company codes 1000 has EUR currency key & 2000 has GBP currency key), I am using the BAPI FM BAPI_ACC_INVOICE_RECEIPT_POST & BAPI_TRANSACTION_COMMIT.
    For this, I am giving the 'DocumentHeader' structure with Company code 1000. 'Accountapayable' structure as Lineitem -0000000001 and credit Account No. & 'AccountGL' structure as Lineitem -0000000002 and Debit Account No. And in 'CurrencyAmount' strcure as with LineItem - 1, Currency - EUR, AMT-BASE as 100- & Lineitem - 2 as with Currenct key - GBP, Exchange rate as 68.36, AMT-BASE as 1.00. (Because as pee my understanding 100EUR = 68.36GBP).
    Using the above test data, i am getting the output parameters result as with message as 'Document posted successfully: BKPFF 010000061210002009 T90CLNT090'.
    But when I go to BKPF table or FB03 transaction I am not able to see this document.
    Regards,
    Basani

    Hi,
    search BAPI for FB03 transaction in SDN..
    try this link.
    RFC or BAPI  for fb03 transaction call
    regards,
    nazeer

  • BAPI_ACC_INVOICE_RECEIPT_POST document posted succ but not in FB03

    Hi
    For the Inter-company G/L Account posting Company codes 1000 has EUR currency key & 2000 has GBP currency key. I am using the BAPI FM BAPI_ACC_INVOICE_RECEIPT_POST & BAPI_TRANSACTION_COMMIT.
    I am getting the output parameters result as with message as 'Document posted successfully: BKPFF 010000061210002009 T90CLNT090'.
    But when I go to BKPF table or FB03 transaction I am not able to see this document.
    Regards,
    Basani

    Hi
    For the Inter-company G/L Account posting (Company codes 1000 has EUR currency key & 2000 has GBP currency key), I am using the BAPI FM BAPI_ACC_INVOICE_RECEIPT_POST & BAPI_TRANSACTION_COMMIT.
    For this, I am giving the 'DocumentHeader' structure with Company code 1000. 'Accountapayable' structure as Lineitem -0000000001 and credit Account No. & 'AccountGL' structure as Lineitem -0000000002 and Debit Account No. And in 'CurrencyAmount' strcure as with LineItem - 1, Currency - EUR, AMT-BASE as 100- & Lineitem - 2  as with Currenct key - GBP, Exchange rate as 68.36, AMT-BASE as 1.00. (Because as pee my understanding 100EUR = 68.36GBP).
    Using the above test data, i am getting the output parameters result as with message as 'Document posted successfully: BKPFF 010000061210002009 T90CLNT090'.
    But when I go to BKPF table or FB03 transaction I am not able to see this document.
    Regards,
    Basani

  • Need to trigger workflow after g/l document posted in FB50

    Hi all
    When a user posts a document in FB50 (G/L journal entry), I need it to trigger a workflow.  I can find BTE's that come in to play before the document number is assigned, but I need it triggered after the document number is assigned.  I tried BTE processes 1120 and 1140 but they're too early.  I also looked at many function modules and user exits suggested by various SDN threads but nothing seems to be triggering.
    I already have a workflow created using BO BKPF and can trigger it manually, but not through FB50.  There's lots of info on BO FIPP, but I'm looking at posted documents, not parked documents.  Tracing FB50 with SWELS/SWEL doesn't show anything.
    Any help would be greatly appreciated.
    Ron

    Hi Ronald,
    If you are using ECC 6.0 try to look explicit enhancement, that is kernel BADI (key words: GET BADI and ENHANCEMENT). If there is none also then use implicit enhancement. Implicit enhancement is always available at the beginning and the end of Function Module, Routines, Program, Methods, etc.
    Regards,
    Lim...

  • Vendor Reconcilation account change during the document posting

    Hello Experts,
    I have one doubt about the Vendor Reconcilation account change during the document posting.
    Is there any way/possibility to change the vendor reconcillation account during the document posting, for a particular vendor.
    If is there any chance please let me know the way how to change it and also letme know the impact of this.
    Thanks in Adavance,
    Satya

    The System always takes the reconciliation account stored into the Vendor master data.
    Technically it is possible to change reconciliation account in vendor master record as follows:
    1) SPRO -> Financial Accounting -> AR and AP -> Vendor accounts -> Master Records -> Preparations for Creating Vendor Master Records -> Define Screen Layout per Activity (Vendors) -> Change Vendor (Accounting) -> Company Code Data ->
    Account management -> field 'Reconciliation account' set to 'optional entry'
    2) Then system will allow you to change reconciliation account in vendor master record.
    In general you can only change recon account when balance is zero.
    "By changing the reconciliation account in the open item master record the proportionate values from the items open at the time of change are not posted to the new reconciliation account.
    Hope this claifies.
    Kind Regards
    Soumya
    Edited by: Soumya Rao on Oct 13, 2011 12:51 PM

Maybe you are looking for