none
BAPI_INCOMMINGINVOICE_CREATE not retuning the document number and fisical year RRS feed

Answers

  • I'm missing the RETURN node in the response message. Having this information might lead you to an error regarding conversion exists or safe typing. So you should try to receive it.

    I'm not quite sure about this BAPI at the moment, is the RETURN part a tables parameter? If yes, please set <sap1:RETURN /> in your request message and let us know what SAP will send you.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    • Marked as answer by Seenajan2 Friday, May 13, 2011 12:04 PM
    Saturday, July 24, 2010 11:22 AM

All replies

  • I'm missing the RETURN node in the response message. Having this information might lead you to an error regarding conversion exists or safe typing. So you should try to receive it.

    I'm not quite sure about this BAPI at the moment, is the RETURN part a tables parameter? If yes, please set <sap1:RETURN /> in your request message and let us know what SAP will send you.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    • Marked as answer by Seenajan2 Friday, May 13, 2011 12:04 PM
    Saturday, July 24, 2010 11:22 AM
  • Thanks a lot for your help.Now i could found out the exact error message,and it is creating the invoice.
    • Marked as answer by Seenajan2 Friday, May 13, 2011 12:04 PM
    • Unmarked as answer by Seenajan2 Friday, May 13, 2011 12:04 PM
    Wednesday, July 28, 2010 12:54 PM
  • Hi,

    I am facing a different problem.I wanted to know like can i use the RETUN in any BAPI request message?

    If I use the RETUN in BAPI_CUSTOMER_GETDETAIL1 it is throwing an exception

    The parameter: RETURN cannot appear in Xml message.

    How can i know that which BAPI expects RETUN and which do not require RETURN?

    thanks in advance.

    Thursday, July 29, 2010 12:33 PM
  • It depends on the BAPI. If the RETURN parameter is a TABLES parameter, then you need to set it in the request message. If it is just an EXPORTING parameter, then you don't need to set it, SAP will generate this for your response message.
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Friday, July 30, 2010 3:02 PM
  • How can i find out that a BAPI is retuning Table Parameter?I am crating the Input XML from the generated proxy class of a BAPI.

    So I have to add RETURN in the input XML if the BAPI Returns Tables parameter.I am not getting how to determine that BAPI returns Tables Parameter.

    thanks

    Friday, August 6, 2010 8:30 AM
  • Two ways:

    1) In SAP / Transaction SE37: There you can see the function itself. Search for the RETURN parameter under the EXPORTING or TABLES tab. If it's listed under TABLES it's a tables parameter.

    2) In Visual Studio: If you got a RETURN parameter in your generated XSD file (request part), then it's a TABLES parameter. If the RETURN only exists in BAPI_INCOMINGINVOICE_CREATEResponse, then it's not a tables parameter.

    In your case (BAPI_INCOMINGINVOICE_CREATE), it's a tables parameter. So in your map that creates the BAPI_INCOMINGINVOICE_CREATE message, use a string concat functoid with an emtpy string and connect it to the RETURN parameter in your request message. This creates an empty node and the WCF adapter returns the data.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    • Proposed as answer by Oliver Hauth Thursday, October 14, 2010 7:06 PM
    Friday, August 6, 2010 12:59 PM
  • Hi,

    I am facing another Issue.

    Suppose I am executing a BAPI.I am finding the parameters from the SAP GUI.

    In the SAP GUI it is expecting only 5 mandatory parametera and  it will return the result.

    But when using biztalk adapter and LOB adapter,I will get the input XML with so many parameters.and it keep asking to supply values to the parameters which i am not supplying when i do from SAP GUI.

    The other option I am doing is I am deleting the nodes from the created XML file which is not required.This is a tedious task for me.Otherwise i have to find all the values for all the nodes.

    Is there any solution for this problem?

    Thursday, September 23, 2010 7:50 AM
  • Why do you need to update all nodes? Normally you can just leave them blank. Is it just this BAPI or are you facing this problem with all BAPIs?
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Thursday, September 23, 2010 2:03 PM
  • With all BAPIs I am facing this problem.Normally datetime is the problem.In SAP GUI it is not expecting all the datetime field has to be supplied.

    But in the adpater it is giving one by one error saying that the datetime value is expecting no: of digits 8.Normally we will think like what all parameters is supplying through the SAP GUI.When we  supply the same no of parameters it should work with the adpater also.

    But the adapter is expecting some extra parameters to be supplied.

    Friday, September 24, 2010 4:16 AM
  • That's due to missing configuration of your port in the admin console. Head over there where you configured WCF-Custom and hit "Configure" button. Somewhere there (don't remember exactly as I'm not in the office today) in one of the tree views there is "data types behaviors" and there are some entries set to "ERROR". Just replace them with the default value you like (or copy it from another entry there) and it should work fine, replacing empty DATS fields with 1990-01-01T00:00:00.000 or something like this.
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Friday, September 24, 2010 4:50 AM
  • Sorry I did not understand how can i find the WCF Custom "Configure" button?
    Saturday, September 25, 2010 4:40 AM
  • In the admin console head over to your application and to your port configuration (send port I guess?). There double click and next to the drop down box where you select WCF-Custom there is a button to configure the adapter. Hitting that will bring a popup windows. There you'll find it.
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Saturday, September 25, 2010 7:21 AM
  • I am not getting how to open the admin console.I have installed Biztalk adpater pack and WCF LOB Adpater.Where can i find the the admin console?
    Monday, September 27, 2010 4:53 AM
  • The normal "BizTalk Administration Console" - nothing Adapter specific.
    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Monday, September 27, 2010 6:04 AM
  • I dont have Biztalk Administration Console.I think it will come only with Biztalk Server installation.Am i correct?

    But I am not using Biztalk Server.

    Monday, September 27, 2010 7:27 AM
  • Why are you using BizTalk Adapter Pack forum to ask your questions? :)

    How are you connecting to SAP then?


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Monday, September 27, 2010 7:33 AM
  • I am using Biztalk Adapter pack and WCF LOB Adpater to connect to SAP.I got answers for my other two problem from you only:)
    Monday, September 27, 2010 8:55 AM
  • Hmm ok, if you use this adapter "manually" then I'm not quite sure how to address this properties during runtime. Maybe some additional parameters in web.config file?

     

    In BizTalk console it looks like this:

    SAPAdapterBindingConfiguration / DatatypesBehavior / InvalidDatsToDatetime = ERROR there you'll have to switch to (e.g.) 0001-01-01T00:00:00 so that the adapter itself replaces the entry in the XML file. If it's on ERROR the adapter will throw an error (not SAP). So I assume that also in your case the adapter is the problem.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Monday, September 27, 2010 12:45 PM
  • Hi,

    Regarding the issue -

    " the adpater it is giving one by one error saying that the datetime value is expecting no: of digits 8"

    It looks like you are passing the data as XML and not using the strongly typed proxy generated for the BAPI. The problem won't occur  if U use the strongly typed proxy.

    If you are passing the data as XML, please ensure that there are are no empty nodes of DATE type. If you don't want to pass the date , remove the node entirely from the request message- don't leave it blank (as in ... don''t leave it like <data></data> or </data>)

    Basically, for all the data types having a minlength of more than zero , this error would occur if u pass an empty node (date has a minlength of 8).

    Thursday, September 30, 2010 6:05 AM
  • This is what i am doing for each BAPI,I have to remove the unwanted nodes from the XML.

    I am looking for the solution without removing the nodes,which should accept empty nodes.

    It is very tedious task to remove all the date type nodes from the generated XML.And sometimes some of the Date field will be required.

    Not only the Date fields,Some other fields also,it will not accept empty nodes,so i forced to remove those nodes.then it will work perfectly.

    So looking for a solution to pass the generated XML,by passing only required data and without doing any manipulation on the XML.

    Friday, October 1, 2010 4:19 AM
  • Normally passing an empty node to the WCF adapter is no problem. If the node is not marked as MinOccurs=1 the adapter takes it and hands it over to SAP. But it depends a little bit of the parameter type of the SAP function. If you are talking about an IMPORTING or CHANGING parameter you will have to look at the function in SAP if you can leave it out. If you are talking about a TABLES parameter that is optional, SAP checks if it's empty. If it's empty the adapter sets a flag for the RFC layer of SAP to ignore this parameter completely (on input and return), otherwise this node will work as a return structure for a TABLES parameter.

     

    But all this depends a lot on you XSD, XML and the RFC function including customizing (mand/obli fields, value lists, etc.). So maybe you could provide this information here?

    Or maybe you have some more detailed information about what parameters exactly raise the error?

     

    If it's only datetype fields then you might have mismatched something during the creation of the XML nodes. YOu can create a SAP XSD with our without the option of savetyping. SO normally a datetime looks like 2010-12-31T23:59:50,000 but with savetyping enabled it would look like 31122010 (so just 8 chars for dates). Have you tried this for dates?

    Empty dates in SAP are normally 01.01.1900 or 31.12.2099 depending if it's a "from" or "until" relation.

     


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Friday, October 1, 2010 4:47 AM
  • I have tried with Safetyping.If safetyping is true or false whatever it will ask to provide the value for Datetime filed.

    I can explain the problem in detail.

    I am executing a BAPI BAPI_ALM_ORDER_MAINTAIN.

    This is the first XML that i am created

     If i execute this it will strat with the below error.

    An error occurred while parsing the xml. Length of variable: STRTTIMCON is 0 but expected length is 6. 

    Since I am not passing this from SAP GUI I am not giving value for this paramater.then i will delete this node from XML.Then it will strat showing the error for other parameters which is of type datetime,Integer,Decimal.

    Then i will strat deleting all the nodes which is of type datetime,Integre,Decimal.

    The finally my XML looks like this

     This works pefeclty fine and I am getting the order number created.

    Even in the correct XML also it was not working If don't enetr the PLANT ,it is giving error for FUNC Location is wrong and Business area is required.ect.And finaly i gave some value for PLANT.Then it strated retuning the result.This is not the behaviour when i excute from SAP GUI.

    Hope i will get  some solution to overcome this problem.

     

    Thursday, October 14, 2010 6:02 AM
  • You have two problems here. The first one is the one with PLANT. This is definitive not BizTalk related as it's a logical check inside the SAP. They must be able to explain the business logik why they need it via RFC and not via GUI. It could be because of preset user parameters (transaction SU3 / parameters).

     

    The datetime / int / whatever problem is related to optional and mandatory fields and default values configured in the connection to SAP. You can find information about this here: http://msdn.microsoft.com/en-us/library/dd788572(BTS.10).aspx

    As you see, some formats like TimsMaxToDateTime is set to ERROR by default. This causes your error. You need to redefine this properties for your interface (e.g. with 2099-12-31T23:59:59.999). After this you should get the order number.

    But keep in mind that you will need to use "valid" default values. So choose them wisely.


    If you like my post or consider it as a valid answer, please use the buttons to show me - Oliver

    http://biztalk.hauth.me

    Thursday, October 14, 2010 7:05 PM
  • I could not find the DataTypesBehavior in Binding property.Is it realted to any particular verion of Biztalk adapter pack.

    I am uisng Bztalk Adpater pack 1.0.

    And when i run Transaction SU3 it is showing You are not authorized to use this transaction.

     

    Friday, October 15, 2010 10:11 AM
  • Hi,

    I am not sure about the issue with plant.

    For enabling DataTypesBehavior in adapter Pack 1.0 you have to install  hotfix 954539.

     

     

    However,

    There is no property called EmptyDateTimeToDats nor would the property solve the problem when you have an integer/decimal field having minlength> 0 .

    Aniway, nither this  hotfix nor enablesafetyping would be able to solve the issue you are facing.

     

    The only way out is to remove these empty nodes from the request message.

     

    I have written a custom pipleline component which tries to plumb the behaviour differences between the old SAP adapter and WCF-SAP adapter. 

     

     The pipeline component address the following three  issues faced by the customer  ( with the corresponding binding configuration properties)  -

     

    Issue

    Name

    Description

    Default Value

    WCF-SAP adapter doesn't allow blank XML nodes , if the min-length is more than zero.

    (fields like data and time )

    RemoveEmptyDataNodesInRequest

     (bool)

    When true, all empty leaf level node will be removed from the request message.

    false

    WCF-SAP adapter doesn't allow ',' as decimal separator

    CultureInfoForDecimal

     (string)

    Culture code for the CultureInfo to use for parsing decimal fields.

    When true, it will use the given  CultureInfo for parsing the xs:decimal, xs:float , xs:double  fields  and convert it to culture-invariant string representation(expected by the WCF-SAP adapter ).

    Vice-versa for response.

    null

    WCF-SAP adapter doesn't return back  tables  exposed as CHANGING parameter,  if the corresponding request message doesn't contain the table.

     

    On the other hand,

    it retunns  a blank table node even if there is no data in the table if the tabel is present in request message.

    AddEmptyTableNodes

    (bool)

    When true, will add empty nodes for all tables which don’t exist  in request message.

    It will also remove empty table from response message to get a response similar to the old adapter.

    false

     

     

     

     

     I am plannig to post the pipleine component in a blog and am currently running some final tests on it.

     I will update this thread when the blog is ready.

     

     

    Monday, October 18, 2010 6:44 PM
  • Hi Experts  ,

      i have one query regarding RFC  ,   scenariao is as given below 

    we have created one  RFC  which  is being called by .net using Biztalk 2.0 Buissnesssuite  .

    But problem we are facing is  when  two RFC is there first to Display Grr Details  and after displaying in .net screen we change  quantity  in screen and pass this all details to another RFC which accepts data in form of table  as return type   .

    it accepts all data  Except Quantity  field  . it does not gives error  but  accept quantity field value as zero  .

    i have changed that field type from decimals in abap to  other data element but still same  no success  .

    Please tell me what may be reason  .

    Regards

    Deepak.

     

     

     

     

    Tuesday, October 26, 2010 8:09 AM
  • The blog for the pipeline component which plumbs the behaviour differences discussed in this thread is up -

    http://blogs.msdn.com/b/biztalk_server_team_blog/archive/2010/11/11/pipeline-component-for-enabling-legacy-behavior-in-wcf-sap-adapter.aspx


    Rohit Singh
    Thursday, November 11, 2010 1:11 PM
  • Hi Rohit. 

    I'm from Brazil and here we only use comma ',' as decimal separator. 

    I tried your pipeline component, but it didn't work, the send port keeps alive, without log any error. But this issue could be that I tried with Biztalk Server 2006 R2. And I know you wrote in Visual Studio 2008 for Biztalk Server 2010.

    Anyway, Did Microsoft create a hotfix for this? 

    Tks a lot, 

    Regards


    Espero ter ajudado
    Ruth Resende
    MVP, MCTS - Biztalk Server
    www.biztalkbrasil.com.br
    Twitter: @ruthresende

    Tuesday, June 19, 2012 12:21 PM
  • No.

    We don't have a hotfix for this. In a correct implementation, ',' should be replaced with '.' when serializing to XML.  Any XML which has ',' as decimal separator

    is incorrect as per standerds.

    That's the reason we went with pipeline component approach, than patching the adapter.

    For the pipeline not working -

    Can you try Building the pipeline with VS2005. If it still doesn't work, you can attach to btsntsvc.exe and see where is it getting stuck.

    [I can work with you on that, if need be. ]


    Rohit Singh

    Tuesday, June 19, 2012 12:33 PM
  • Tks for your reply. Very fast :)

    So if I understood, the only thing that this pipeline do is replace the comma ',' to '.' rigth?

    I tried send with '.' and the ABAP told me at first look its ok.

    I will make more tests and I will update this thread with the result.

    Tks a lot for your help. 

    Best Regards.


    Espero ter ajudado
    Ruth Resende
    MVP, MCTS - Biztalk Server
    www.biztalkbrasil.com.br
    Twitter: @ruthresende

    Tuesday, June 19, 2012 2:23 PM
  • Hi Guys, 

    I'm only updating this thread with results of my tests.

    It really worked, change the comma ',' to '.'

    I thought the our SAP could make a mess because our language is Portuguese, but it worked perfectly.

    Tks a lot. 

    King Regards.


    Espero ter ajudado
    Ruth Resende
    MVP, MCTS - Biztalk Server
    www.biztalkbrasil.com.br
    Twitter: @ruthresende

    Tuesday, July 3, 2012 4:33 PM