Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
TanmayVerma
Active Participant

Add a line item automatically when a user clicks on save to sales order in VA01

Limitations:

There is a long list of user-exits present in SD module that facilitate customization to the standard process. However, no User exits , Customer Exits or BADI's have been provided which can add an item automatically to Sales Order.

Expectations:

To add an item manually in a SO the only input required from the user is the material number and quantity. Rest all the information is determined automatically by the standard code.The automatic addition of item should take care of below points.

      • The only required input should be material number and quantity.
      • Item number ( VBAP-POSNR ) should be auto determined.
      • Item category and other item details should be read from master data / configuration tables.
      • Schedule line data to be determined as for a normal manually added item.
      • Pricing should be determined automatically.
      • Any code written in user exits should be triggered for this item as well.

Approach Followed:


We will be using  USEREXIT_MOVE_FIELD_TO_VBAK to write our code. This userexit is present in include MV45AFZZ of program SAPMV45A.

This user exit is used to transfer some fields to the sales order header.However , we will write our code in this exit to add an item during save.

Code:

*--Check if the user has pressed SAVE button

IF sy-ucomm EQ 'SICH'.

 

*--Read table XVBAP to check if the material is not already added

           READ TABLE xvbap INTO ls_xvbap WITH KEY matnr = 000000000000240000

                                                     updkz = 'I'.

           IF sy-subrc NE 0.

             CLEAR: vbap.

*--Initialize workareas for VBAP and VBEP


             PERFORM vbap_unterlegen(sapfv45p).

             PERFORM vbep_unterlegen(sapfv45e).

*--Populate material number and quantity

             vbap-matnr     = ‘000000000000240000’.

             rv45a-kwmeng   = 1000.

*--Call standard performs to populate material details.

*--Perform for material validations and details

             PERFORM vbap-matnr_pruefen(sapfv45p) USING charx sy-subrc.

*--Perform for item category determination. This will take care of substitution items if any for this material.

             PERFORM vbap-pstyv_pruefen(sapfv45p).

*--Perform for filling VBAP with default values from configuration and master tables

             PERFORM vbap_fuellen(sapfv45p).

             PERFORM vbap-matnr_null_pruefen(sapfv45p).

             PERFORM vbep-wmeng_setzen(sapfv45e).

*--Perform to check sales unit

             PERFORM vbap-vrkme_pruefen(sapfv45p) USING charx

                   CHANGING sy-subrc sy-msgid sy-msgty sy-msgno

                            sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*--Perform to update VBAP values

             PERFORM vbap_bearbeiten(sapfv45p).

*--Perform for filling VBEP with default values. This will take care of schedule lines of the item

             PERFORM vbep_fuellen(sapfv45e).

*--Perform to check quantity

             PERFORM vbep-wmeng_pruefen(sapfv45e) USING charx

                   CHANGING sy-subrc sy-msgid sy-msgty sy-msgno

                            sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*--Perform to update VBEP values

             PERFORM vbep_bearbeiten(sapfv45e).

*--Perform to fill conditions and pricing data

             PERFORM vbap_bearbeiten_ende(sapfv45p).

           ENDIF.

         ENDIF.

Execution Snapshots:

Go to VA01 to create a sales order. Enter sold to party and other details. Add 1 item manually.

Click on save, item 240000 should be item as next item ( POSNR 20 ).


Check the SO in VA03. Here the item 20 is added successfully.




Check line item schedule line data:


Check Pricing data:

Thus , we see in this way a line item can be added automatically in the sales order.

Advantages:

  • The item addition can be done on the basis of certain conditions and multiple items can be added by placing this code in a loop.
  • Since all standard performs are called to fill the data , even the different user-exits for item will be triggered if implemented for the item.
  • By adding a check for call_bapi equal to 'X' and TRTYP eq 'H' , this code can be executed from Create Sales Order BAPI also.
  • Item number is determined automatically.
  • Item category , item substitution, scheduling , availability check and pricing is done by standard performs.
  • If the requirement is to add items just as the user enters the header details, that can be done with minimum code changes.

Use Cases:

This can be used in certain business scenarios like:

  • Suppose based on the customer some free items need to be added to sales order. In such case the item ( material ) and customer combination can be stored in a custom table. It can be then read from and populated automatically.

  • It can also be used if some default material has to be added to all sales orders being created.

EDIT:


  • The above code can also be written in user exit  USEREXIT_SAVE_DOCUMENT_PREPARE.


  • Sometime the requirement can be to delete a line item internally using code.Below is the code for this

        Suppose we want  to delete the item number 20.


        ivbap-selkz = 'X'.

        MODIFY ivbap TRANSPORTING selkz WHERE posnr = '0020'.

        IF sy-subrc EQ 0.

          PERFORM xvbap_loeschen_loop(sapfv45p).

        ENDIF.



Help Taken from below SCN posts:


Re: New line  in SD order

Re: Adding default line items on VA01/VA21 based on Incoterms




Note:


Sensitive data has been blurred in the snapshots.

Feel free to provide feedback and valuable comments.

  • ~ Tanmay
54 Comments
former_member185613
Contributor
0 Kudos

very useful :smile:

Former Member
0 Kudos

useful information.

Former Member
0 Kudos

Excellent piece of Information.Very helpful

former_member185054
Active Participant
0 Kudos

nice document.kindly explain in which business scenario it will be useful.

TanmayVerma
Active Participant
0 Kudos

Hi Sampath,

This can be used in certain business scenarios like:

  • Suppose based on the customer some free items need to be added to sales order. In such case the item ( material ) and customer combination can be stored in a custom table. It can be then read from and populated automatically.

  • It can also be used if some default material has to be added to all sales orders being created.

Regards,

Tanmay.

priyaranjan_gupta
Participant
0 Kudos

Very useful information.nicely explained.

Former Member
0 Kudos

Hi,

useful informations.

Thanks & Best Regards,

Mohd Fakruddin.

Juwin
Active Contributor
0 Kudos

This information was already present in Re: New line  in SD order and Re: Adding default line items on VA01/VA21 based on Incoterms

Thanks,

Juwin

TanmayVerma
Active Participant
0 Kudos

Hi Juwin ,

Thanks for posting the links. I had taken help from SCN posts for achieving my requirement but now was not able to find these posts  again whil creating the document.

I will add these 2 links in the document as acknowledgement.

~Tanmay.

jpfriends079
Active Contributor
0 Kudos

Hi,

If you propose to hard coding the material values in your enhancement program. Then we can achieve the same result with Standard BOM functionality(when different materials for both items are determined) and free goods determination (when same material are determined in the line items). That to be without adding a single code/enhancement.

What is the gist of this enhancment, when we can achieve the same functionality with enhancement?

Thanks, JP

TanmayVerma
Active Participant
0 Kudos

Hi Jyoti,

The hard coding showed in the document was only for example. In actual scenario we maintain a custom table having material number , customer and quantity of material. The material is then read on the basis of customer and the quantity to be added is calculated based on certain calculations. This item is then finally added using the above approach during SO creation.

At the same time the custom table is updated with the quantity added so as to keep track of the quantity left.

Also , the table provides the facility to:

  • switch off the material for a customer and replace it with new material
  • not adding the material if the quantity is exhausted
  • adding multiple materials for same customer. ( more then 1 material can be added to SO)


we can achieve the same result with Standard BOM functionality(when different materials for both items are determined) and free goods determination (when same material are determined in the line items).



I am not fully aware of the BOM functionality. Can we make the material and quantity determination dynamic using this ?

~Tanmay.

jpfriends079
Active Contributor
0 Kudos

Hi Tanmay,

Before proposing this solution to the business, did you take consent of your functional consultant for logistics?


- material is then read on the basis of customer and the quantity basis of customer and the quantity to be added is calculated based on certain calculations


- switch off the material for a customer and replace it with new material


- not adding the material if the quantity is exhausted


- adding multiple materials for same customer. ( more then 1 material can be added to SO


Unfortunately, whatever you have mention above, can be achieved through standard configuration mention by me in my previous post. And that to be dynamically.

Probably, you can talk to a functional consultant(SAP SD) in your team or you can search and read regarding BOM/Free Goods determination functionality.

Thanks, JP

TanmayVerma
Active Participant
0 Kudos

Hi Jyoti ,

Thanks for the insight on the topic. I would certainly explore on this more.

As per the solution, it was discussed with the SD consultant. The table approach that we used was being used for other functionalities also apart from just adding the line item and since the table was being maintained by users directly who might not have knowledge of SD configurations, it was done in this way.

Thanks,

Tanmay.

jpfriends079
Active Contributor
0 Kudos

Hi

It's straight, enhancement has its own pros & cons. And enhancement is not at all advisable when you have standard functionality available. But, well-being of system Is consultant's priority and responsibility.

If users starts dominating the system configuration. Then why would they need Consultant or Consulting Service provider/partner. Moreover, those are basic SAP SD standard functionality.


who might not have knowledge of SD configurations


Strange! By the way, which industry your user belong to?

Thanks, JP

TanmayVerma
Active Participant
0 Kudos

Hi ,

The end users belong to the supply chain industry and accessing the system through web interface / portal applications.

~Tanmay

jpfriends079
Active Contributor
0 Kudos

Hi Tanmay,

The discussion going between us is not to discourage you or find fault. And I appreciate the way you have assertively handled my queries/concerns.

Functionally? Content may not be convincing to me. But, I can't ignore the way content is represented. It is good and systematic documentation. Probably, you can have

1. numbering to the title

2. table of content

3. Code can be represented in different font (say, courier new)

.

Whether user uses SAP System in foreground or background. Basic and standard feature/functionality available in the system should not be ignored. Instead of opting for enhancement.

Best wishes.

Cheers, JP

TanmayVerma
Active Participant
0 Kudos

Hi Jyoti,

Thanks a lot for your suggestions and pointing in the right direction. The discussion was definitely a good learning for me. :smile:   Even , i believe in what you said and try to make use of the standard functionality and go for enhancements unless its the last option.

I will explore the BOM / free good configs and see how that can be used.

Thanks.

Tanmay.

Juwin
Active Contributor
0 Kudos

Hi Jyothi,

We had to use this kind of enhancement when we had to add Freight cost to the order.

Thanks,

Juwin

jpfriends079
Active Contributor
0 Kudos

Hi Juwim,

Can you explain your requirement for which did the similar enhancement?

Thanks, JP

Juwin
Active Contributor
0 Kudos

Whenever the order value was lower than a minimum value, we had to add a fixed surcharge to the order. So, we added a new line to the order, using a service material, to add the fixed value.

Thanks,

Juwin

jpfriends079
Active Contributor
0 Kudos

Hi Juwin,

I assume fixed surcharge is for the whole sales doc that means it's a header condition. So, why that is taken item level and that to be as service material?

Thanks, JP

Juwin
Active Contributor
0 Kudos

Hi Jyoti, Please see details here Fixed Surcharge on Orders below minimum value.Thanks, Juwin

0 Kudos

very much helpful

Former Member
0 Kudos

Keep Learning new things tanmay :smile:   Way to go :smile:

jobis
Contributor
0 Kudos

Hi Tanmay,

Good document in terms of the structure and presentation. It will be very handy for ABAPErs, if not for SD consultants.

these kind of requirements can be met through std configurations in SD, even the additional surcharge for low value orders can be configured in std. its available in std pricing procedure.

Regards

Jobi

bruno_esperanca
Contributor
0 Kudos

It's funny how sometimes you learn just as much or even more from the discussions than from the original post.

Thanks so much Juwin.

And thanks a lot to Tanmay as well for this very helpful post.

Cheers,

Bruno

Former Member
0 Kudos

Hi Tanmay,

   Perfect solution, thanks.

Regards

Dou

Former Member
0 Kudos

Hello Tanmay,

I have exactly the same requirement within my project :

In my SD offer, I first need to identify item when material S_ANS is present. Then I need to recreate on item per line in my service order components.

Based on your guidelines, I developed my exit to create sales order items.

But although I used all the perform you mentioned, some data from vbap are still not populated what cause problem in SD document flow copy.

Here is my code in the MOVE_FIELD_TO_VBAK :

IF ( vbak-auart = 'ZSDH' ) AND ( sy-tcode = 'DP80' ).

    IMPORT w_skip FROM MEMORY ID 'ZSDH_SKIP'.

    CHECK w_skip = abap_false.

    w_perform = abap_false.

* Check if S_ANS Material is present and delete item

    LOOP AT xvbap INTO ls_xvbap WHERE matnr =  'S_ANS'.

      ls_xvbap-updkz = 'D'.

      w_pstyv = xvbap-pstyv.

      w_perform = abap_true.

      MODIFY xvbap FROM ls_xvbap TRANSPORTING updkz.

    ENDLOOP.

    PERFORM vbap_bearbeiten_ende(sapfv45p).

    IF w_perform = abap_true.

* Get components information from service order

      SELECT werks bdmng meins potx1 rspos

        FROM resb

        APPENDING CORRESPONDING FIELDS OF TABLE tb_components

        WHERE aufnr = vbap-aufnr

        AND matnr EQ ''.

      IF sy-subrc = 0.

        w_skip = abap_true.

        EXPORT w_skip TO MEMORY ID 'ZSDH_SKIP'.

* Create one ANS item per component (what DIP cannot do)

        LOOP AT tb_components INTO ls_components.

*     Fetch last existing item number

          DESCRIBE TABLE xvbap LINES w_lines.

          READ TABLE xvbap INDEX w_lines.

          w_posnr = xvbap-posnr.

*--Initialize workareas for VBAP and VBEP

          PERFORM VBAP_BEARBEITEN_VORBEREITEN(sapfv45p). "666

          PERFORM vbap_unterlegen(sapfv45p).

          PERFORM vbep_unterlegen(sapfv45e).

          xvbap-posnr = w_posnr + 10.

          xvbap-matnr = 'S_ANS'.

          xvbap-matwa = 'S_ANS'.

          xvbap-arktx = ls_components-potx1.

* Field EANNR is used to store recording of RESB (required for PREPARE TKOMP)

          xvbap-eannr = ls_components-rspos.

          xvbap-zmeng = ls_components-bdmng.

          xvbap-umzin = ls_components-bdmng / 1000.

          xvbap-umziz = ls_components-bdmng / 1000.

          xvbap-meins = ls_components-meins.

          xvbap-werks = ls_components-werks.

          xvbap-zieme = ls_components-meins.

          xvbap-updkz = 'I'.

          xvbap-spart = '00'.

          xvbap-pstyv = w_pstyv.

          append xvbap.

*--Call standard performs to populate material details.

*--Perform for material validations and details

          PERFORM vbap-matnr_pruefen(sapfv45p) USING charx sy-subrc.

*--Perform for item category determination. This will take care of substitution items if any for this material.

          PERFORM vbap-pstyv_pruefen(sapfv45p).

           PERFORM VBAP_FUELLEN(sapfv45p).  "666

           PERFORM VBAP_BEARBEITEN(sapfv45p).  "666

*--Perform for filling VBAP with default values from configuration and master tables

          PERFORM vbap_fuellen(sapfv45p).

          PERFORM vbap-matnr_null_pruefen(sapfv45p).

          PERFORM vbep-wmeng_setzen(sapfv45e).

*--Perform to check sales unit

          PERFORM vbap-vrkme_pruefen(sapfv45p) USING charx

                CHANGING sy-subrc sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*--Perform to update VBAP values

          PERFORM vbap_bearbeiten(sapfv45p).

*--Perform for filling VBEP with default values. This will take care of schedule lines of the item

          PERFORM vbep_fuellen(sapfv45e).

          PERFORM vbep-wmeng_pruefen(sapfv45e) USING charx

                CHANGING sy-subrc sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*--Perform to update VBEP values

          PERFORM vbep_bearbeiten(sapfv45e).

*--Perform to fill conditions and pricing data

          PERFORM vbap_bearbeiten_ende(sapfv45p).

        ENDLOOP.

        w_pricing_to_update = abap_true.

        EXPORT w_pricing_to_update TO MEMORY ID 'ZSDH_PRICE'.

      ENDIF.

    ENDIF.

  ENDIF.

It is working but I need to fix many value that are automaticaly populated if I create item manualy. (Like VBAP-KONDM; or KZTLF for example).

So I assume one standard perform is still missing to commit data at then end.

Do you have recommendation ?

Former Member
0 Kudos

NB : I add recently the line ended with comment "666 to see if it solves my problem but without success.

TanmayVerma
Active Participant
0 Kudos

Hi  PA,

Sorry for the late reply.

The code has to be written in USEREXIT_MOVE_FIELD_TO_VBAK. I can see and extra 'Append XVBAP' in your code. KIndly check if that is causing the issue. As the standard performs will take care of the XVBAP table and no explicit append is required.

Using the code i have mentioned in the document i was able to successfully create an line item with all the required data.

Regards,

Tanmay.

yarnagula_sudhir
Active Participant
0 Kudos

Hi tanmay.verma2 ,

I'm very impressed with your solution. Thank you for providing to us.

I'm having similar scenario in my project and I've done it so good and so simple based on your solution.

TanmayVerma
Active Participant
0 Kudos

Thanks  yarnagula.sudhir.

Happy to help. :smile:

~Tanmay

yarnagula_sudhir
Active Participant
0 Kudos

Hi tanmay.verma2 ,

I have a scenario.

1. My requirement is to add same material again, but only once.

2. But your read statement does not allow for same material. (SY-SUBRC NE 0.)

3. If I excluded read statement logic, as this exit triggers multiple times, my proposed material adding multiple times.

4. Even though i've gone for count logic, as this exit triggering multiple times, its clearing my count variable on every iteration.

Kindly let me know the how to resolve my issue. Kindly help me out on priority.

With Regards,

Sudhir.

TanmayVerma
Active Participant
0 Kudos

Hi Sudhir,

You can declare your count variable as STATIC. This will hold the value during the LUW and will not get cleared out.

Ex:  Statics: lv_count type i. ( instead of Data: lv_count type i. )

Regards,

Tanmay.

yarnagula_sudhir
Active Participant
0 Kudos

Hi tanmay.verma2 ,

Thanks alot for your reply and solution. Static variable worked.

But how to make my proposed line item NET and TAX to be ZERO. Functional people maintaining Pricing as Mandatory for proposed Material.

With Regards,

Sudhir.

former_member213851
Active Contributor
0 Kudos

Nice one Tanmay !!! :smile:

Former Member
Really helpful post!!! Thank you so much.
former_member183990
Active Contributor
0 Kudos
Hi tanmay, nice post

PERFORM vbepwmeng_setzen(sapfv45e). this piece of perform is not in the system . what to do any work around.
TanmayVerma
Active Participant
0 Kudos
Hi Janagar ,

 

Apologies for the late reply. Can you please let me know the system being used ?

 

Regards,

~Tanmay
Former Member
0 Kudos
hi tanmay,

now i am able to see the code, the following are the issues

a)i am not able to track down the user status of the current line and copy the same into copied line b) i am passing the price, at komv-kbetr just before PERFORM vbap_bearbeiten_ende(sapfv45p).  it is is not getting into the item.

Please help with some tips.

even i tried updating xkomv for the netprice, but it is not happening.

Regards

S.Janagar
vijay4sap
Explorer
0 Kudos
Hi Tanmay,

 

Thanks for this blog. Very useful. I am using the same logic to add lines in the same user exit. However it gives me a syntax error 'The field VBAP-MATNR is unknown'. Did you also get this error ? Many thanks,

Vijay.
vijay4sap
Explorer
0 Kudos
By the way, I am implementing the logic in an Implicit enhancement instead of changing the Userexit directly.
0 Kudos
Hi  Tanmay,

Nice post and its really helpful to me .

Could you please help me in updating the quantity fields automatically like creation. Actually i am using enhancement spot to populate the items automatically, now my requirement is to change the quantities based on popup. So, i am unable to use the exits as they are triggering at my point.

Thanks in advance and it would be really helpful if you provide some solution.

 

Thanks,

Raj
kamalakar_reddy2
Explorer
0 Kudos
Hello Tanmay,
Greetings.
My requirement is to determine free goods(Inclusive) at material group level instead of line item level and add the free goods line item by with least price material  .I am able to add free goods line item but I am not able to reduce the qty of line item having existing least price materail .Can you please let me know if you have some idea.

Thanks,

Kamalakar.
0 Kudos
Hello Tanmay,

I have a similar requirement where I need to add a new line item dynamically at run time (with material 'VC_AC_PWRC_M_IN' ) if a material is 'VC_AC_PWRC_B_NA' is present in a line item list.

For example,

if material 'VC_AC_PWRC_B_NA' is present, then add a new line item with material 'VC_AC_PWRC_M_IN'.

I have referred the code you have mentioned above, but it is not working.

Please help 🙂

 
TanmayVerma
Active Participant
0 Kudos
Hi Kiran,

Could you provide more info on the error. Since this blog is 5 year old , i gues if you are using S4H system there might be changes in standard code which might cause issue.

 

Also , did you look into the possibility of using the standard item substitution ? This looks more like the substitute item requirement.

https://help.sap.com/doc/1f8ac95360267214e10000000a174cb4/2.6/en-US/e589c95360267214e10000000a174cb4...

BR

Tanmay
0 Kudos

Thanks for prompt reply Tanmay.

Yes. I am using S4 HANA server.

Actually the requirement is to add a new line item when the country of Ship To Party(WE) is changed(Header Partner Tab).

If the changed country is present in the custom table along with an existing material(let’s say ‘VC_AC_PWRC_B_NA’) combination, then add a new line item entry with material ‘VC_AC_PWRC_M_IN’.

I have used user exit 'USEREXIT_MOVE_FIELD_TO_VBAK' under include MV45AFZZ of program SAPMV45A

Awaiting for your reply ?

Thank you.

0 Kudos

Hello  Tanmay.

I am able to add single line item using the code mentioned above. But my requirement is to add multiple materials.

I have added above code in a loop statement and passing materials accordingly but it is not working.

Code snippet is as follows : Here subroutine PERFORM vbep_bearbeiten(sapfv45e) ( "*–Perform to update VBEP values ) is causing an issue.

 

        LOOP AT lt_zvesper_saleskit ASSIGNING FIELD-SYMBOL(<fs_saleskit>).

          "*–Initialize workareas for VBAP and VBEP
          PERFORM vbap_unterlegen(sapfv45p).
          PERFORM vbep_unterlegen(sapfv45e).

          "*–Populate material number and quantity
          vbap-matnr <fs_saleskit>-accessory. "<<--New Material is passing as per loop processing

          rv45a-kwmeng 2.

          "*–Call standard performs to populate material details.

          "*–Perform for material validations and details
          PERFORM vbap-matnr_pruefen(sapfv45pUSING charx sy-subrc.

          "*–Perform for item category determination.
          "This will take care of substitution items if any for this material.
          PERFORM vbap-pstyv_pruefen(sapfv45p).

          "*–Perform for filling VBAP with default values from
          "configuration and master tables
          PERFORM vbap_fuellen(sapfv45p).

          PERFORM vbap-matnr_null_pruefen(sapfv45p).

          PERFORM vbep-wmeng_setzen(sapfv45e).

          "*–Perform to check sales unit
          PERFORM vbap-vrkme_pruefen(sapfv45pUSING charx
          CHANGING  sy-subrc sy-msgid sy-msgty sy-msgno
                    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

          "*–Perform to update VBAP values
          PERFORM vbap_bearbeiten(sapfv45p). "<<--Giving issue

          "*–Perform for filling VBEP with default values. This will take care of schedule lines of the item
          PERFORM vbep_fuellen(sapfv45e).

          "*–Perform to check quantity
          PERFORM vbep-wmeng_pruefen(sapfv45eUSING charx
          CHANGING  sy-subrc sy-msgid sy-msgty sy-msgno
                    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

          "*–Perform to update VBEP values
          PERFORM vbep_bearbeiten(sapfv45e).

          "*–Perform to fill conditions and pricing data
          PERFORM vbap_bearbeiten_ende(sapfv45p).
        ENDLOOP.

 

Please help. ?

former_member771554
Discoverer
thank you
0 Kudos
Hi Tanmay,

I need to update the quantity in such same requirement, after the line item has been added. What steps do we need to follow here. I tried with these codes, but the changed quantity is not getting saved. Could u please help me here.
Labels in this area