Wednesday, 24 February 2010

SAP123 | How to setup and use SAP

 

Serial Numbers and materials

By Willem Hoek


Serialization is a way to keep track of individual items (material masters). When processing transactions, example Goods Receipt, Physical Inventory, etc.. you don't just type in material and quantity but also the serial numbers of the individual items. Serial numbers is a unique number that identify an item. Example if quantity is 2, one need to indicate serial numbers of the two items. A report is available to show all movements for a spesific serial number.
Lets go through a simple example to do a Physical Inventory posting on a material where we activate serial numbers.
Setting up -- Master data

A material is activated in Plant / Data Storage 2 view of material master. Field MARC-SERNP .The options (serialization profiles) are set up in configuration and define how it will be used (see below).

Using it in transactions

Lets look an an Inventory Management transaction for this material, transaction MI10 to do a stock adjustment and see where the serial numbers are used.

For this material, serialization is active, so the system force you to enter the serial numbers of the items, in this case the quantity was 2, therefore 2 serial numbers

Lets look at stock overview -- tcode mmbe and see if the serial numbers are visible.

Showing all the serial numbers

Double clicking on the serial number take you to transaction IQ03 -- serial number per material.

History of all inventory management transactions related to this serial number are visible by hitting the 'History' button

Setting up -- Configuration
IMG Menu: Sales and Distribution > Basic Functions > Serial Numbers > Determine Serial Number Profile - tcode OIS2

For every profile, one needs to specify the area in SAP where it will be used and how it will be used.

Serial number usage:
01 - None
02 - Optional
03 - Obligatory
04 - Automatic
Equipment required indicates if a equipment is required.
01 - Proposal without equipment
02 - always with equipment
SAP version used for this post: SAP ECC (ERP Central Component) 5.0

SAP123 | How to setup and use SAP

Handling differences in Purchase Order, Goods Receipts and Vendor Invoice Prices

Handling differences in Purchase Order, Goods Receipts and Vendor Invoice Prices


What is the procedure to adopt in case of the following situations when they arise? (FOR SAP 4.6C version)

First situation
1)
a) PO LINE ITEM NET PRICE = US$100

b) The item is goods receipted with a price of US$110. Assume the difference of US$10 is because of tax caluculated by the system (for example)

c) Vendors sends an Invoice for this item at the price of US$85 (US$80 PO line item price + US$5 tax).

So in this case, the Invoice price is lower than the PO net price which is US$100.
So for this type of situation what is the procedure to adopt to post the invoice in the system.
Is it that the first the goods receipt needs to be reversed and then change or update the PO line item net price with US$80(for example) and then do the goods receipts and then do the invoice receipt?

If this procedure is correct and what happens if vendors invoice price is lower than the origianl PO line item net price (as described in this case), whether the system blocks the invoice in this case or not?

Or is it that the goods receipt need not be reversed and just post the invoice with the new price and change the PO price with the new vendor invocied price?

When is that the price in the info record needs to be changed?

Second situation
2) What is the procedure to adopt when the vendor's invoice price is greater than PO line item price?

Basically, I am just looking for the correct procedures to adopt in both of these cases like in what sequences,(like what is the first step and what is the second step) with what steps to follow.

What to do procedurally - how to post an invoice with differing value than PO and/or GR and what to do if an invoice blocks, etc in both the cases like when the vendor invoice price is less than the PO price (line item net price plus tax) and one more, I need to know is in this case will the invoice gets blocked upon invoice posting when the vendor price is low.

Similarly in the second case what to do procedurally when the invoice price is more than the PO price (Line item net price +tax)?


Whatever tolerances you have set for over or under invoice will determine if any blocks occur (this covers both your first and second examples). (Transaction code: OMR6)

When the clerk enters the invoice the system will note that the invoice is going to block but will not stop it from being posted. (Transaction: MIRO)

Procedurally, the buyer checks blocked invoices and resolves the block be either:

1. Changing the PO price to match the invoice and then the invoice should unblock (either automatically if you have it set up that way, or the buyer can release the block) or

2. Buyer can dump the block without changing the PO price (info record price history is not updated in this case because PO price wasn't changed).

In either case, if you have your materials being valuated at GR and then at IR, the invoice will revalue the material so there is not really a need to reverse the GR to change the PO price and then reenter the GR.

The transaction code for viewing blocked invoices (and releasing them) is MRBR.

Tuesday, 23 February 2010

payment block, - Toolbox for IT Groups

 

payment block,

Asked by gangadhar.redd... on 4/19/2004 5:59 AM

Hi,
We have 3 invoices which are blocked for payment due to Schedule date
variance. While doing MRBR these document does not show up to release for
payment, Not able to understand what is the problem. System shows the
message "M8 658 :- no blocked invoices found". There is note 679788 on
message # M8 657. can I implement it in this situation? Would it give the
expected results!!

payment block, - Toolbox for IT Groups

Monday, 22 February 2010

ONE TIME VENDOR

one time vendor'. what is the benefit of create on 'ome time vendor'. please explain.

--------

One time vendor is used for occasional or rare purhasing from a particular vendor.

For example you are purchasing a particular material few times a year and you have more materials and many vendors ( > 50).

You no need to create all the vendors in the system, you can simply create one time vendor and it will serve the purpose of >50 VMR.

Whenever you use the one time vendor in applications like RFQ,PO,Contract, you must maintain the address manually

And during invoice verification you must input the bank details.

Hope it helps

Thanks/karthik

-------

One time vendor means a vendor from which normally we dont procure material frequently. May be once in a year or may be for the purpose of Quotation we can create one time vendor.

Creating one time vendor is the same process as creating regular vendor (XK01/FK01), the only difference will be Vendor Account Group. For one time vendor there will be saperate vendor account group so at the time of vendor create it will require minimum vendor information.

You need to maintain vendor address and other relevent accounting data at the time of PO and IR.

If you want to make one time vendor for regular vendor you can change the vendor account group and maintain the additional data as required for regular vendor.

Regards,
Nani.

----------

One Time Vendor is normal type of vendor but with different account group(account grp classifies vendor master).
The beauty of one time vendor is that you can create a vedor group(one time vendor code) and when you are using this vendor code in Purchase order and during Inv receipt,you can put the address of the vendor you desire.

This concept is usually used in repair scenario,where one is quite not sure to whom he is goinig to give the order.Eg If I want to repair an motor,It is very difficult to decide the source and here come the ONE TIME VENDOR.
When you create an order with one time vendor befor saving the purchase order system asks you address of the vendor to be maintained.

Hope it is usefull to you......

--------

the purpose is to avoid data redundancy as we use the account group of one time the vendor specifc fileds will become greyed out ,this is becuase we may occasionally buy from that vendor for those vendor we may not required to maintain a master data in taht case we will be storing large number of datas which we may occasinally use.

---------

here i am giving one example of business process , one telecom comapny is there and sold out some public booths , after some days they want to return the public booths to the telecom company, in this case the telecom company maintained one one-time vendor and will raise POs with different booth owners addresses and receive that booths and pay the amount,
in the above case vendor code is same for all POs and deliver to different places,

-------------

One time Vendor is one which is used very rarely . It differs from the regular vendor in few cases:
1. Vendor account group changes
2.doesnt contain Vendor address and Bank details.

When there has to be many vendor master records created for one time use or very rare purpose , u will alwaz create this type of one time vendor where as u dont have to give all the Vendor related details. So u specially select the one time vendor account group and create this type of vendor.

Hope this helps u.

-----------

one time vendors are useful to not blow up your vendor masterdata.

In a lot of companies masterdata maintaince is centralized and setting up a new vendor master cost money.

So if you legally need to put in an invoice on the vendor because of e.g. VAT requirements or you want to pay it by automatic payment but you are sure you never use the masterdata again, one-time (CPD) vendor are a good solution.

--------------------

mySAP FI - Purpose of One Time Vendor / Customer

 

What is the treatment of one time customer / vendor accounts in SAP?

One time customer / vendor accounts in SAP means they are account groups for customer/vendor and where in only the general data of the customer / vendor are stored instead of maintaining the bank data and other company code data that are relevant for other account groups which are useful for long run purposes.

As you know everything that is entered in SAP is saved in some TABLE.  Now the customer & vendor master is such a table which holds vast amount of data.

The business secenario where the vendor or customer which are being in system only for 1 transaction, it is not advisable to have all the data maintained in main master.

Therefore SAP has provided with the feature of One time vendor / customer wherein in the document entry stage only you have to enter the name, addres and other details of the vendor/customer.

The data, as far as I know' remains at doc level and does not goes to master tables.

Tips by Santosh Kumar Agarwal

What is difference between vendor and one time vendor and what purpose to create one time vendor and what are required field to fill in vendor and one time vendor? - Navas

One time vendors are those who are not frequent vendors. Company will be using those vendors very rarely, maybe once in a life time.  SAP is giving a special category for those type of vendors. Normal vendors will have separate Master Data which will have their address, country, bank account, terms of payment, payment methods, etc. 

Whereas there will not be such records kept in Master data for those one time vendors. This way you will reduce the data base size. There will be one vendor master record named as one time vendors and will have the check box ticked while creating this record. Country field is mandatory when creating a normal vendor master (sap standard) whereas it will not be in case of one time vendor. 

When you post a document to this vendor (One time vendor), it will prompt you to fill the name address and all the required fields at the document level. 

mySAP FI - Purpose of One Time Vendor / Customer

System Task: Create a One-Time Vendor Master Record

 

System Task: Create a One-Time Vendor Master Record


Overview

Use this transaction to create a new One-Time Vendor Master Record. A one-time vendor includes:

Menu Path
From the SAP R/3 Screen, select the path:

Logistics >> Materials management >> Purchasing >>
(new menu) Master data >> Vendor >> Central >> Create
Fast Path
At the Command Line, enter:

/NXK01
Create Vendor: Initial Screen

Key Fields (Complete or Review)

Vendor

To create a vendor master for a different purchasing organization, enter the vendor account number. Otherwise, leave blank.

Company code

Enter CUR for MIT.

Purch. organization

Enter one of the following purchasing organization codes:

  • GPO General Purchasing
  • SUB Subcontracts

Account group

Enter CPD to indicate the MIT One-time vendor account group.
To tie the one-time vendor master to a reference vendor, enter the following fields, located in the Reference Box:

Note: The information entered for a reference vendor defaults to the One-Time Vendor Master Record being created.

Vendor

If using a reference vendor, enter the reference vendor number. Otherwise, leave blank.

(F4) to access a matchcode.

Company code

If using a reference vendor, enter CUR to indicate MIT. Otherwise, leave blank.

Purch. organization

If using a reference vendor, enter one of the following purchasing organization codes. Otherwise, leave blank.

  • GPO General Purchasing
  • SUB Subcontracts
Next Step...

(ENTER) to access the Create Vendor: Address Screen.

Create Vendor: Address Screen

Key Fields (Complete or Review)

Name

To indicate that this is a one-time vendor, enter ONE-TIME VENDOR.

Search term

To indicate that this is a one-time vendor, enter ONETIME.

Country

Enter the vendor's abbreviated country name.

(F4) to access the full list.

Language

Enter E for English.
Next Step...

(ENTER) to access the Create Vendor: Accounting info. Screen.

Create Vendor: Accounting info. Screen

Key Fields (Complete or Review)

Reconcil. acct

Enter 200010 to indicate the AP Reconciliation Account for Vendors as the vendor's G/L reconciliation account.

Sort key

Enter the key indicating the layout rule for the allocation field in the document item if known.

(F4) to access the full list.

Minority indic.

Enter the code indicating whether the vendor is a small or minority-owned business.

(F4) to access the full list.

Prev. acct no.

Enter the vendor's previous VAPS number if known.
Next Step...

(ENTER) to access the Create Vendor: Payment Transactions Screen.

Create Vendor: Payment Transactions Screen

Key Fields (Complete or Review)

Payment terms

Enter ZB00 to indicate the terms of payment being Within 30 Days Due Net.

(F4) to access the full list.

Chk double inv.

Click the box to have the system automatically check for duplicate invoices when posting is made to the vendor account.

Payment methods

Enter C to indicate the method used to pay the vendor is by Check.

Payment block

Enter the block for payment code for the vendor account if known.

(F4) to access the full list.

Next Steps...

(ENTER) to access the Create Vendor: Correspondence Screen.

(ENTER) to access the Create Vendor: Purchasing data Screen.

Create Vendor: Purchasing data Screen

Key Fields (Complete or Review)

Order currency

Enter USD to indicate US dollar as the purchase order currency.

Terms of payment

Enter ZB00 to indicate the terms of payment being within 30 days due net.

(F4) to access a matchcode.

Salesperson

Enter the name of the responsible salesperson at the vendor's office if known.

Telephone

Enter the salesperson's telephone number if known.
Required Selection
Click the box beside one or more of the following fields in the Control Data Box:

GR-based inv. verif.

To indicate GR-based invoice verification.

Automatic PO

To indicate that purchase orders are to be generated automatically from purchase requisitions if the requisition has been assigned to the vendor.
Next Step...

(F11) to save the One-Time Vendor Master Record. The Create Vendor: Initial Screen reappears, and a message indicating that the vendor master has been created appears in the System Message Line at the bottom of the screen.



Copyright © 1996, Massachusetts Institute of Technology. All rights reserved.

System Task: Create a One-Time Vendor Master Record

Sunday, 21 February 2010

Posting more than 999 records through BAPI

 

Posting more than 999 records through BAPI
Welcome Guest
View a printable version of the current page.

Added by Krishna Chauhan , last edited by Craig Cmehil on Dec 28, 2009  (view change)

Labels:

abap, tutorial

Add Labels

Wait Image

Enter labels to add to this page:

Tip: Looking for a label? Just start typing.

Introduction: There are a number of scenarios when we found our BAPI does not post/check records more than 999 line items. Actually there is a limitation in BAPI where we can't post more than 999 records. This small piece of code will serve our purpose.
Suppose our XL file contains thousand of records & we have to check/post using BAPI in a bunch of 950 records.
We need to upload the data of XL to our internal table, let's say we have uploaded the records to internal table   ITAB_INDATA.

PERFORM POST_DOCUMENT .

FORM        POST_DOCUMENT .

DATA:  V_LINES  TYPE I,

              V_LINES1 TYPE I,

             COUNT(3)   TYPE N.*----declaration of internal tables used in BAPI

DATA: DOC_HEADER LIKE BAPIACHE09 OCCURS 0 WITH HEADER LINE,

            DOC_ITEM   LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,

            DOC_VALUES LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,

            CUSTOMER   LIKE BAPIACAR09 OCCURS 0 WITH HEADER LINE,   

            VENDOR     LIKE BAPIACAP09 OCCURS 0 WITH HEADER LINE,   

           CHECK_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,

           OBJTYP TYPE  AWKEY.

  DATA:  V_BAL   TYPE P DECIMALS 4,

               V_BAL1  TYPE P DECIMALS 4,

               V_INDEX LIKE SY-TABIX.*---set the counter to '0' which will calculate the number of records

COUNT = 0.

CLEAR: ITAB_INDATA.  *---Calculating the number of records in internal table

DESCRIBE TABLE ITAB_INDATA LINES V_LINES.*----Logic to be implemented inside the internal table

  LOOP AT ITAB_INDATA.    *----Clearing the internal tables before appending data
    CLEAR: DOC_HEADER[], DOC_ITEM[], CUSTOMER[], VENDOR[], DOC_VALUES[].

    CLEAR: LWA_INPUT_FILE.*----Here we are filling the structure and internal tables corresponding to Transaction Number field in our  internal table

AT NEW TNO.

      LOOP AT ITAB_INDATA INTO LWA_INPUT_FILE WHERE TNO = ITAB_INDATA-TNO.* Fill Document Header

        DOC_HEADER-USERNAME = SY-UNAME.

        DOC_HEADER-COMP_CODE  = 'BP01'.

        DOC_HEADER-HEADER_TXT = LWA_INPUT_FILE-BKTXT.

        DOC_HEADER-REF_DOC_NO = LWA_INPUT_FILE-XBLNR.

        DOC_HEADER-DOC_DATE   =  LWA_INPUT_FILE-DDATE.

        DOC_HEADER-PSTNG_DATE =  LWA_INPUT_FILE-PDATE.

        DOC_HEADER-DOC_TYPE   = LWA_INPUT_FILE-BLART.

        ADD  1 TO COUNT.  ** Fill Document Item

        MOVE COUNT TO DOC_ITEM-ITEMNO_ACC.

        MOVE COUNT TO DOC_VALUES-ITEMNO_ACC.

          DOC_ITEM-GL_ACCOUNT = LWA_INPUT_FILE-GLACC.

          DOC_ITEM-PSTNG_DATE = LWA_INPUT_FILE-PDATE.

          DOC_ITEM-DOC_TYPE   = LWA_INPUT_FILE-BLART.

           DOC_ITEM-PROFIT_CTR = LWA_INPUT_FILE-PC.

           DOC_ITEM-ALLOC_NMBR = LWA_INPUT_FILE-ASSGN.

           DOC_ITEM-ITEM_TEXT  = LWA_INPUT_FILE-TEXT.

           DOC_ITEM-COSTCENTER = LWA_INPUT_FILE-CC.

           DOC_ITEM-ACCT_TYPE  = LWA_INPUT_FILE-ACTYP.

           DOC_ITEM-COMP_CODE  = 'BP01'.

          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

            EXPORTING

              INPUT  = DOC_ITEM-GL_ACCOUNT

            IMPORTING

              OUTPUT = DOC_ITEM-GL_ACCOUNT. 
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

            EXPORTING

              INPUT  = DOC_ITEM-COSTCENTER

            IMPORTING

              OUTPUT = DOC_ITEM-COSTCENTER. 
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

            EXPORTING

              INPUT  = DOC_ITEM-PROFIT_CTR

            IMPORTING

              OUTPUT = DOC_ITEM-PROFIT_CTR.          APPEND DOC_ITEM.
          CLEAR DOC_ITEM. 
          MOVE COUNT TO VENDOR-ITEMNO_ACC.

          VENDOR-VENDOR_NO  = LWA_INPUT_FILE-GLACC.

          VENDOR-ALLOC_NMBR = LWA_INPUT_FILE-ASSGN.

          VENDOR-ITEM_TEXT  = LWA_INPUT_FILE-TEXT. 
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

            EXPORTING

              INPUT  = VENDOR-VENDOR_NO

            IMPORTING

              OUTPUT = VENDOR-VENDOR_NO.

          APPEND VENDOR.

          CLEAR VENDOR.

          MOVE COUNT TO CUSTOMER-ITEMNO_ACC.

          CUSTOMER-CUSTOMER   = LWA_INPUT_FILE-GLACC.

          CUSTOMER-ALLOC_NMBR = LWA_INPUT_FILE-ASSGN.

          CUSTOMER-ITEM_TEXT  = LWA_INPUT_FILE-TEXT.

          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

            EXPORTING

              INPUT  = CUSTOMER-CUSTOMER

            IMPORTING

              OUTPUT = CUSTOMER-CUSTOMER.

          APPEND CUSTOMER.

          CLEAR CUSTOMER. * Fill Document Value.

        DOC_VALUES-CURRENCY_ISO = 'USD'.

        DATA: NUM TYPE P DECIMALS 2.

        CLEAR NUM.*---in case of Credit amount available

          DOC_VALUES-AMT_DOCCUR = LWA_INPUT_FILE-CRAMT * -1.*---in case of Debit  amount available

          DOC_VALUES-AMT_DOCCUR = LWA_INPUT_FILE-DRAMT.        APPEND DOC_VALUES.
        CLEAR DOC_VALUES.         V_LINES1 = V_LINES1 + 1.                "Counting line no
        READ TABLE ITAB_INDATA INDEX V_INDEX.

        IF ITAB_INDATA-DRAMT <> SPACE.

          CLEAR V_BAL.          "clear when found debit amount

          V_BAL1 = ITAB_INDATA-DRAMT.

          V_BAL = V_BAL + V_BAL1.

        ENDIF.

        IF SY-SUBRC = 0.

          IF ITAB_INDATA-CRAMT <> SPACE.

            V_BAL1 = ITAB_INDATA-CRAMT * -1.

            V_BAL = V_BAL + V_BAL1.

          ENDIF.

        ENDIF.    *----V_LINES contains total no of records in internal table
        IF V_LINES >= 950.

          IF V_LINES1 >= 950

                        AND V_BAL = 0.*---call bapi

              PERFORM CHECK_BAPI.

           ENDIF.   "IF CHECK <> 'X'.*---refreshing tables for storing another chunk of records

            REFRESH: DOC_ITEM, CUSTOMER, VENDOR, DOC_VALUES.

            clear COUNT.

            V_LINES = V_LINES - V_LINES1.

            CLEAR: V_LINES1, V_BAL.   "clearing balance & line counts

            CONTINUE.

          ELSE.

            CONTINUE.

        ENDIF.

      ENDLOOP.*----In case records less than 950

      IF V_LINES < 950

                 and V_LINES <> 0.  "avoiding if remaining records = 0.*---call bapi

            PERFORM CHECK_BAPI.*---refreshing tables for storing another chunk of records

            REFRESH: DOC_ITEM, CUSTOMER, VENDOR, DOC_VALUES.

          ENDIF.   "IF CHECK <> 'X'.

    ENDAT.

  ENDLOOP.

ENDFORM.                    " POST_DOCUMENT 
FORM CHECK_BAPI .

  CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'

    EXPORTING

      DOCUMENTHEADER          = DOC_HEADER

    TABLES

     ACCOUNTGL               = DOC_ITEM

     ACCOUNTRECEIVABLE       = CUSTOMER

     ACCOUNTPAYABLE          = VENDOR

     CURRENCYAMOUNT          = DOC_VALUES

      RETURN                  = CHECK_RETURN    .*----If CHECK_RETURN contains Success result then post documents using

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

    EXPORTING

      DOCUMENTHEADER    = DOC_HEADER

    IMPORTING

      OBJ_KEY           = OBJTYP

    TABLES

      ACCOUNTGL         = DOC_ITEM

      ACCOUNTRECEIVABLE = CUSTOMER

      ACCOUNTPAYABLE    = VENDOR

      CURRENCYAMOUNT    = DOC_VALUES

      RETURN            = RETURN.

*---If no error found commit BAPI   'BAPI_TRANSACTION_COMMIT'

  ENDFORM.                    " CHECK_BAPI

When the documents get posted the 'BAPI_ACC_DOCUMENT_POST' will generate an document no.

We can pass that document number to FB03 Transaction to check out the posted documents.

SAP Community Network Wiki - ABAP Development - Posting more than 999 records through BAPI

Saturday, 20 February 2010

BAPI_ACC_GL_POSTING_POST

 

Author: pradeepchoudhari
REPORT zpradeep_gl_posting.
DATA:
* Structure for document header
g_docheader LIKE bapiache08,
* Table and header for G/L Account Line Items
gi_accountgl TYPE STANDARD TABLE OF bapiacgl08,
g_accountgl LIKE bapiacgl08,
* Table and header for Line Item Currency Fields
gi_amount TYPE STANDARD TABLE OF bapiaccr08,
g_amount LIKE bapiaccr08,
* Return
gi_return TYPE STANDARD TABLE OF bapiret2,
g_return LIKE bapiret2.
START-OF-SELECTION.
*---------------------------------------------------------
* HEADER DATA
*
* OBJ_TYPE Objekttypes can be found in table TTYP
* OBJ_KEY Seems that you can use any value
* OBJ_SYS Logical system. Logical ystems can be found in
* table TBDLS. If there is no logical system assigned
* to the client, assign it this way:
*
* Transaction: SPRO
* - Basis components
* - Application Link Enabling (ALE)
* - Sending and receiving systems
* - Logical systems
* - Define logical system
* - Assign client o logical system
*
*
*---------------------------------------------------------
g_docheader-obj_type = 'BKPFF'.
g_docheader-obj_key = '1'.
g_docheader-obj_sys = 'B3TCLNT800'.
g_docheader-username = sy-uname.
g_docheader-header_txt = 'BAPI test'.
g_docheader-comp_code = '1000'.
g_docheader-doc_date = sy-datum.
APPEND g_amount TO gi_amount.
*---------------------------------------------------------
* LINE ITEMS
*---------------------------------------------------------
* Item 1
g_accountgl-itemno_acc = '0000000001'.
g_accountgl-gl_account = '0000192600'.
g_accountgl-pstng_date = sy-datum.
APPEND g_accountgl TO gi_accountgl.
* Item 2
g_accountgl-itemno_acc = '0000000002'.
g_accountgl-gl_account = '0000192600'.
g_accountgl-pstng_date = sy-datum.
APPEND g_accountgl TO gi_accountgl.
*---------------------------------------------------------
* CURRENCY AND AMOUNT
*---------------------------------------------------------
* Item 1
g_amount-itemno_acc = '0000000001'.
g_amount-currency = 'EUR'.
g_amount-amt_doccur = 5000.
APPEND g_amount TO gi_amount.
* Item 2
g_amount-itemno_acc = '0000000002'.
g_amount-currency = 'EUR'.
g_amount-amt_doccur = -5000.
APPEND g_amount TO gi_amount.
END-OF-SELECTION.
* Call the BAPI function
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = g_docheader
* IMPORTING
* OBJ_TYPE =
* OBJ_KEY =
* OBJ_SYS =
TABLES
accountgl = gi_accountgl
currencyamount = gi_amount
return = gi_return
* EXTENSION1 =
.
LOOP AT gi_return INTO g_return.
WRITE: / g_return-message.
ENDLOOP.

SAP R/3 форум ABAP консультантов View topic - BAPI_ACC_GL_POSTING_POST

SAP Community Network Forums: BAPI 'BAPI_ACC_GL_POSTING_POST' ...

 

BAPI_ACC_GL_POSTING_CHECK

CALL FUNCTION 'BAPI_ACC_GL_POSTING_CHECK'
EXPORTING
documentheader = w_documentheader
TABLES
accountgl = it_accountgl
currencyamount = it_currencyamount
return = it_return.

Populate the corresponding tables with the data you have.
For the Date do convert it.
PERFORM convert_date USING it_header-bldat
CHANGING w_documentheader-doc_date.

w_documentheader-comp_code = 'z998'
w_documentheader-doc_type = 'SA'
"and fill the respective tables this way .


BAPI_ACC_GL_POSTING_POST

call function 'BAPI_ACC_GL_POSTING_POST'
exporting
documentheader = doc_header
IMPORTING
OBJ_TYPE = l_objtype
* OBJ_KEY =
* OBJ_SYS =
tables
accountgl = t_accountgl
currencyamount = t_curramt
return = t_return
* EXTENSION1 =

SAP Community Network Forums: BAPI 'BAPI_ACC_GL_POSTING_POST' ...

Tuesday, 16 February 2010

Payment Block

Payment block R can come for various reasons like delivery schedule,terms of payment,quality reasons etc.
Use
You can block an invoice manually. You have two options for doing this when you enter the invoice:
You can block an invoice by entering an R in the field Payment block in the document header data.
You can block an item by selecting the M (manual blocking reason) field in the item list. When you post the invoice, the system automatically sets an R in the field Payment block in the vendor line of the accounting document. Manually blocked items are given the blocking reason Manual block (M).

 

================================================================================================================================================================================================

Re: Prevent removal of invoice verification paymt block in F

Guys, what the hell you are talking about? It's much more simple... Tr. OB27. the very right column - "not changeable". Blocking indicator R should have this tick (plus check box "manual payment block to be not ticked), all other blocking indicators which are supposed to be set/removed through FB02 - not ticked (along with check box "manual payment block ticked), it does the job.

================================================================================================================================================================================================

 

Invoice verification Error Message Correct

Every time I try to do invoice verification in MM, I get the message below. PL tell me how I can resolve the issue. And also The amount you enter by default is alaways in USD, could we use any other Currency.
Error Msg --> You may only enter amount upto USD 10,000.00

Reply

Hi,
Go to SPRO > MM > Logistics Invoice Verification > Authorization Management > Define Tolerance Groups
Here check the following;
Amount per document
Amount per open item account item
Cash discount per line item
And increase the amount if you want
Here we do following activities;
1. By choosing Edit -> New entries, you create a new combination of tolerance group and company code.
2. To reach the allocation table on the detail screen, position the cursor on a line and choose Details. Enter the maximum permissible values for the tolerance group in the area "Upper limits for posting procedures".
The area "Permitted payment differences" is only important for employees in Financial Accounting.
SPRO > MM > Logistics Invoice Verification > Authorization Management > Assign User Tolerance Group > Here Assign a tolerance group to each user
If you don't want this message for the user then delete this user ID from this and then check

================================================================================================================================================================================================

Manual Payment Block

You can remove payment block manually by following method aprat from MRBR:

In purchasing at the time of posting.

Go to :Logistics >> Material management >> Purchasing >> Purchase Order>> Follow-on Functions >> Logistics Invoice Verification >> EnterInvoice(MIRO)


Step 1
To remove a block at the time of posting, you must access the payment document (51XXXXXXXX) immediately after completing theposting. Click on Invoice document >> Display
The document you just posted will be displayed. Click on Following Documents.
A pop-up box listing the accompanying (system created documents) is displayed.
Click on Accounting document. The invoice document will be displayed.

Step 2
Double click on the vendor line item, which is the first line item to display the payment screen.
If this in an OTA Vendor, you will need to click on or hit enter when the Address screen appears
To remove the block, simply click on the change icon, this will open the Pmnt block field for change. Delete the R and click onto save the document.

2.In accounts payable after posting.
Accounting >> Financial Accounting >> Accounts Payable >> Document >> Change
To remove a block after posting, you must access the payment document (51XXXXXXXX) through Accounts Payable and remove the block.

At the Change document: Initial screen, enter the document number and press enter.
Double click on the vendor line item (line item 1) to display the payment screen.
If this in an OTA Vendor, you will need to click on or hit enter when the Address screen appears.

In the Pmnt block field, the R (Invoice verification) must be removed. To remove the block, simply delete the R in the Pmnt block filed and click on
to save the document.

Sunday, 14 February 2010

MM-IV-LIV-MRBR Invoice Release in LIV Transaction MRBR


Welcome Guest
View a printable version of the current page.

Added by Guest , last edited by Guest on Jun 04, 2009  (view change)

Labels:

(None)

Add Labels

Wait Image

Enter labels to add to this page:

Tip: Looking for a label? Just start typing.

Content

Use and Overview

  • Before you can pay a blocked invoice, you must release it in a separate step. You do so by canceling the blocking indicator that was set when the invoice was posted.
  • Since the total invoice amount is to be paid and not individual invoice items, the blocking indicator is set in the vendor line of the accounting document. As a result, all the items in an invoice can only be released at the same time.
  • MR02: invoice release transaction for blocked invoices that were posted in CIV (MR01)
  • MRBR: invoice release transaction for blocked invoices that were posted in  LIV
  • Releasing LIV blocked invoices that were posted before 4.6A: MR02 or MRBR if you first convert them with report RM08RBKPBLOCKED
  • two processes for releasing invoices for payment:
    • Releasing Automatically
    • Releasing Invoices Manually

Settle with transaction MBRR: selection

  • Move cash disc. Date:
    • To specify when exactly an invoice is to be paid, you agree terms of payments with the vendor. These terms of payment contain the baseline date from which your cash discount period applies. If an invoice was blocked for payment for a long time, your cash discount deadline could expire. If you release this invoice, you can select the field Move cash discount date on the initial screen of the invoice release transaction and retain the agreed cash discount.
  • Canceled invoices are not taken into account.

Settlement with transaction MBRR: Releasing Automatically

Use
When you release invoices automatically, the system deletes all blocking reasons that no longer apply.
When all blocking reasons in an invoice are deleted, the system automatically releases the invoice.

Prerequisites
It is only possible to automatically release invoices if their blocking reasons are no longer valid. This can be the case for invoices blocked due to quantity, price, or schedule variance s, or due to quality inspection.
You can only use the function Release automatically for the blocking procedure Blocked due to variances.

Result
The system issues a list of the invoices released. The system will also release invoices for which a manual block was set in the document header if the blocking reasons in all items no longer apply.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Settlement with transaction MBRR: Releasing Manually

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Deleting Blocking Reasons

Use
You can delete individual blocking reasons while processing a blocked invoice item.

Procedure

  1. Place the cursor on the blocking reasons that you want to delete.
  2. Choose       Delete blocking reasons. The system highlights the deleted blocking reason in color.
  3. Check your entries.
  4. Choose       Save changes.

Result
If there are other blocking reasons in this item or other items in the invoice, you receive a message
indicating that the selected blocking reason was deleted.
When you delete the last blocking reason in an invoice, the system automatically releases the invoice. The following message appears:
nn invoice(s) released

Releasing Invoices

Use
When you release an invoice, the system reverses the blocking indicator in the accounting document for the invoice. In the vendor line, the R in the field Payment block is deleted.

Procedure

  1. Select the invoice document that you want to release. The system automatically selects all other items in the invoice since you cannot release individual items.
  2. Choose   !6 Release Invoice.jpg!Release invoice.
  3. Check your entries.
  4. Choose      Save changes. The invoices selected are only released for payment when you save them.

Technical details: Database Structure

Database Structure of Incoming Invoice:

  • RBKP: Header data of an Incoming Invoice
  • RSEG: Item data (reference to a PO)
  • RBMA: Item data (reference to a material)
  • RBCO: Item data (Direct posting to G/L account)

Specialities of an Incoming Invoice blocked for payment:

  • There exists a record in the index table RBKP_BLOCKED (containing 10 fields for fast selection of blocked invoices)
  • Important field in RBKP_BLOCKED: Logistics payment block (MRM_ZLSPR) with possible values
    • A  Automatically blocked due to existence of blocking reasons
    • S  Stochastically blocked
    • M Manual payment block set in header - no blocking reasons
  • In an automatically blocked invoice (MRM_ZLSPR = 'A') there is at least one blocking reason in RSEG / RBMA / RBCO:

  • Database structure of the FI follow-on document:
    • First (vendor) BSEG Item: Payment Block is set (BSEG-ZLSPR = ‚R')
  • Attention: RBKP contains exactly the data the user has entered, so RBKP-ZLSPR is only filled when the user has entered a value. This means
    • The field RBKP-ZLSPR is not necessarily set in the case of blocked invoices:
    • The field RBKP-ZLSPR will never be changed in the Release process

Technical Details: RM08RELEASE - Overview Flow Logic

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Technical Details: Debugging tips (1)

Why does MRBR not show an invoice as blocked for payment?

  • First check the corresponding database entries (RBKP_BLOCKED, first BSEG item: BSEG-ZLSPR)
  • Debugging: breakpoint on SELECT of RBKP_BLOCKED in RM08RELEASE:
      ...
    START-OF-SELECTION.

* Selection from RBKP_BLOCKED -----------------------------------------*
  SELECT * FROM rbkp_blocked INTO TABLE tab_rbkp_blocked
       WHERE    mrm_zlspr  = f_mrm_zlspr
         AND    bukrs      IN so_bukrs
         AND    gjahr      IN so_gjahr
         AND    lifnr      IN so_lifnr
         AND    belnr      IN so_belnr
         AND    usnam      IN so_usnam
         AND    budat      IN so_budat
         AND    faell      IN so_faell
         AND    ekgrp      IN so_ekgrp.
  ...

Technical Details: Debugging tips (2)

Why does (does not) MRBR release an invoice automatically?

  • Check the prerequisites for releasing invoices automatically. Check if with processing option „release manually", blocking procedure „blocked due to variances" the blocking reason is white (~valid) or coloured (~not valid)

Why does MRBR show a blocking reason as valid (not valid)?

  • Check the IMG documentation of the corresponding tolerance key.
  • Debugging:
    Put a breakpoint on:
    RM08RELEASE  form BLOCKING_REASON_VALIDITY_CHECK
    Put another breakpoint on
    function module: MRM_TOLERANCE_CHECK
    (MRM_TOLERANCE_CHECK is executed e.g. in RM08RELEASE from function module  MRM_BLOCK_REASON_VAL_CHECK_P which is called from BLOCKING_REASON_VALIDITY_CHECK for   tolerance key PP.
      MRM_TOLERANCE_CHECK is also the function module which -in general- determines whether an invoice is blocked for payment when you post it e.g. with MIRO)

Technical Details: RM08RELEASE - Summary

  • Transaction MRBR
  • Report RM08RELEASE
  • Works only for documents of LIV when they have a record in the index table RBKP_BLOCKED. Cancelled Invoices are not selected by MRBR because they do not have a RBKP_BLOCKED entry.
  • Selection Screen: like a usual report
  • List: ALV
  • Automatic Release in the background possible
  • Database update not immediately but after saving explicitly

Update of the Incoming Invoice

  • Deletion RBKP_BLOCKED
  • Deletion blocking reasons in RSEG if necessary
  • Update of FI follow-on document (Deletion BSEG-ZLSPR) via Accounting Interface (TRWPR-PROCESS = ‚PYMNTBLK')
    • AC_PAYMENTBLOCK_CHECK

Tuesday, 9 February 2010

MM Tables

Material Mnagement Tables

Written by anon

Material Management Tables

EINA purchasing Info record.

EINE Purchasing Info Record Purchasing Data.

MAKT Material description.

MARA General Material Data.

MARC Plant data for material

MARD Storage location Data for material.

MAST Material to BOM Link.

MBEW Material valuation

MKPF Header Material Document

MSEG Document segment material.

MVER Material consumption.

MVKE Sales data for material.

PKPF document header Reservation

TO23 Material Groups .

TO24 Purchasing groups .

T156 Movement Type

Purchasing Tables

EBAN Purchasing requisition.

EBKN Purchase requisition account assignment.

EKBE History per purchasing document.

EKET Scheduling agreement schedule lines.

EKKN Account assignment in purchasing document.

EKKO Purchasing document header.

EKPO Purchasing document Item.

IKPF Header Physical inventory document.

ISEG Physical inventory document items.

LFA1 Vendor master general data.

LFB1 Vendor Master (company Code)

RESB Reservation/Dependent requirement

MARD Storage location data for material.

           ( Important Fields)

MATNR    Material Number (18C CT-MARA).

WERKS   Plant (4C CT-MARC)

LGORT    Storage location (4C)

LABST     Valuated stock with unrestricted use (13 QUAN).

VMLHE    Stock in transfer (from one storage location 2

                another) (13 QUAN).

VNSHE    Stock  in quality inspection (13 QUAN)

MSEG  Document segment material

   (Important Fields)

MBLNR    Number of matrial document (10C)

MJAHR    Material document year.

ZEILE       Item in material document.

MATNR    Material number (18C CT-MARA).

WERKS   Plant (4C CT-T001W).

KDPOS    Item number is sales order(6C).

KDEIN      Delivery schedule for sales order.

BUKRS    Company code.

T001W  Plant /Branches.  

     (Important Fields)

WERKS     Plant

ANME1      NAme (30C).

EKORG     Purchase organization (4C CT-T024E).

VSTEL       Shipping /Rekieving port (4C).

EKKO Purchasing document header 

   ( Important Fields)

EBELN     Purchasing document number.

BUKRS    Company code.

BSTYP     Purchasing document category (1C).

BSART     Purchasing document type (4C).

EKORG    Purchasing organiation (4C  CT-T024E).

EKGRP    Purchasing group (3C CT-T024).

ANGNR    Quotation number.

LLIEF       Supplying Vendor (10C  CT-LFA1).

KUNNR    Customer number (10C CT-KNA1).

MEMORY Purchase Order not yet complete(1C).

T001L  Storage Locations 

   (Important Fields)

WERKS    Plant  .

LGORT      Storage location (4C) .

VSTEL      Shipping /Recieving point (CT-TVST) .

VKORG     SAles Organization  (CT-TVKO).

VTWEG     Distribution channel (CT-TVTW).

SPART      Division    (CT-TSPA).

MARC  : Plant Data for material.

   (Important Fields)

MANDT     Client

MATNR     Material Number

WERKS    Plant

DISPR       Material MRP Profile (4C).

DISMM      MRP TYpe (2C) .

DISPO       MRP Controller (3C).

PRCTR      Profit center (10C).

TRAME      Stock in transit (QUAN-13).

STLAN       BOM Usage  (1C).