Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

va21 create quotation without inco terms part 2

0 Kudos
1,618

Hi All,

When I use BAPI_QUOTATION_CREATEFROMDATA2 to create a quote, even if I do not supply inco terms part 2, SAP auto populates that field. Is there a way, in customizing, with which I can stop this from happening?

Thanks

20 REPLIES 20

ziolkowskib
Active Contributor
1,448

Hi mike.senikoglou1,

If I'm not mistaken by default it's copied from customer master data.

Have you tried populating fields INCOTERMS1 and INCOTERMS2 with value 'X' in QUOTATION_HEADER_INX to indicate that you are actually passing an empty value?

Regards,

Bartosz

0 Kudos
1,448

Hi, I only want to stop inco2 from auto populating. Passing X in QUOTATION_HEADER_INX-INCOTERMS2 does not stop this from happening

VeselinaPeykova
Active Contributor
1,448

I am confused by what you describe or request.

As a start - is Incoterms populated only when you create the document via a BAPI or also when you use VA21? If this happens only when you use a BAPI, but not in VA21, this does not seem right, you will have to investigate what is the reason. Hint: in nearly al cases it will be custom code, use SNIF and PRCAT to find the logic, or just debug.

In standard systems Incoterms in sales quotations comes either 1) from a preceding document (for this to happen you need to have suitable routines in VTAA for copying the values) or 2) from the customer master data. In this case I cannot understand why you want to clear the Incoterms location 2 and keep the rest. If you want to set different Incoterms than what is in the master data - you can do so - just set the related parameters in the BAPI.

Still, before you do any of these - talk to your functional consultant to understand why the field is maintained in the master data and in which processes it is important to have it.

0 Kudos
1,448

this happens in va21 also

VeselinaPeykova
Active Contributor
1,448

mike.senikoglou1 in this case - check the customer master data and after speak with the functional consultant to understand the business process better.

Actually, I managed to create a quotation for which I do not have Incoterms location 2 despite that I have it in the master data (only for the sake of an exercise). I populated INCOTERMSV, INCOTERMS1, INCOTERMS2L in QUOTATION_HEADER_IN and everything related to Incoterms in QUOTATION_HEADER_INX.

This means that the challenge is not with customizing, you just need to play a bit with the BAPI to understand how to use the parameters. I would recommend transaction BAPI for additional documentation for the BAPI that you use.

0 Kudos
1,448

If this is the case why don't you provide everything that you used in the BAPI so I can confirm and solve the issue?

0 Kudos
1,448

Hi mike.senikoglou1,

I believe you are being encouraged to verify your own code and find out the root cause of the issue on your own having in mind that the described solution should work. Honestly I appreciate the approach.

We can also try another approach in which you paste your code and we review it - would that approach suite you better?

Regards,
Bartosz

0 Kudos
1,448
Bartosz Ziólkowski This does not happen in my code. It happens when I run BAPI_QUOTATION_CREATEFROMDATA2 in se37.

0 Kudos
1,448

mike.senikoglou1 I already mentioned what I filled in the relevant parameters.

Did you try what I explained? If yes - what was the outcome?

Did you talk to your functional consultant? If yes - what did they tell you about populating Incoterms 2, what is the business scenario that requires this special treatment?

An important part of solving problems is to identify whether there is a problem at all that needs solving.

0 Kudos
1,448

Again if you can provide a test case in se37, provide all data and values, please do so.

0 Kudos
1,448
Veselina Peykova your reply is very general. You just mentioned that you populated some fields. It would be helpful if you provided a complete answer otherwise I do not find your post helpful.

0 Kudos
1,448

mike.senikoglou1 if I give you the whole answer this would be spoon-feeding.

With a whole and complete answer you will not learn as much as when you try by yourself.

Frankly, it was expected that you would show screenshots of your test case and the outcome of it in the question itself 🙂

0 Kudos
1,448
Veselina Peykova the objective is not to learn here, but to solve a business issue. If you do not have an answer that solves this then please so not waste your time.

0 Kudos
1,448

mike.senikoglou1 you have not figured out the aim of this site - it is not to solve somebody else's tickets, it is for professionals to exchange knowledge and seek help after they have put effort in solving the problem themselves.

I give up 🙂

0 Kudos
1,448

So basically you are saying that you know the answer for the issue but you are not providing it?!

0 Kudos
1,448

mike.senikoglou1,

I said that you need to discuss the business case with your functional consultant before you decide that you should clear Incoterms 2. The other thing that I said is that it makes sense for you to update the question with the test case that you are performing so that people can try to help you.

Another thing that I said is that you can try to use the information that I provided and test in your system whether it works, if it does not work - to post the outcome of the test.

It seems that you did not follow any of the advice that I gave so far, so I see no compelling reason to persist in trying to help.

ziolkowskib
Active Contributor
0 Kudos
1,448

Hi mike.senikoglou1

I debugged it the logic while creating the Quotation in ERP and it seems that the default value of INCO1 and INCO2 is overwritten only in case another (not empty) value is provided in the BAPI thus when I tried passing empty value default INCO2 was copied from customer master data and in case I provided a dot '.' in field INCO2 of structure QUOTATION_HEADER_IN I was able to overwrite the default value.

Now I start to wonder what system are you using? veselina.peykova mentioned field INCOV that is not available in ERP system but is available in S4 (chekced on 1809).

Are you testing this in ERP or in S4?

Regards,
Bartosz

0 Kudos
1,448

I may be wrong, but my understanding is that INCOV is a part of the Incoterms 2010 feature, which is available also in ERP EhP7 after you implement the required notes and activate LOG_SDMM_INCO_VERSION (at least this is what note 2180138 says).

0 Kudos
1,448

You might be right but in the version of ERP I use this is not available. It seems the logic of handling incoterms in ERP (the version I use) and S4 (1809) is a bit different thus I wanted to verify what version we are referring to. So far I was not able to populate INCOTERMS2 with empty value so it would be reflected in the Quotation.

Regards,
Bartosz

1,448

I made a test case in a EhP4 system and I can confirm that it is possible to create a quotation via the BAPI with INCO2 set as blank (without a dot). In this case I populate in the header these fields:

INCOTERMS2 I set as blank, for INCOTERMS1 I used the same value as in the master data of my customer. Filling the rest of the fields in the structures is quite straight-forward, but it depends on the configuration in the specific system and on the available master data.

There is just one small catch (which is why I asked the OP to speak with a functional consultant) - you can leave INCO2 blank if in the customizing it is not specified that location is mandatory. For Incoterms where the location is mandatory, there will be an error message preventing you from saving the document.

In the systems where I am sure that no one has modified the settings - location is not mandatory only for FH and UN.

Because of the impact of changing such settings or not specifying the data correctly I asked the OP a few times to discuss the case with the functional consultant... which did not happen. 🙂