Skip to Content

How to use ReqDate field in Purchase Quotation by using SAP B1 SDK?

Hi all;

I have a problem in SAP B1 SDK,

I connected SAP B1 with PHP successfull by using DI API where I interact with Sales order but now I want to add Purchase Quotation in same way, the problem I have is

Fatal error: Uncaught exception 'com_exception' with message 'Unable to lookup `ReqDate': Unknown name. ' in C:\xampp\htdocs\sap.php:59 Stack trace: #0 C:\xampp\htdocs\sap.php(59): unknown() #1 {main} thrown in C:\xampp\htdocs\sap_test.php on line 59

As it seems ReqDate field and all UDF of Purchase Quotation give same error message

The following is my sample codes

$Quota=$mycomp->GetBusinessObject(540000006);

$Quota->CardCode="00001";

$Quota->DocDueDate="06/04/2018";

$Quota->DocDate="06/04/2018";

$Quota->TaxDate="06/04/2018";

$Quota->ReqDate="06/04/2018"; //Error message found here (Fatal error: Uncaught exception 'com_exception' with message 'Unable to lookup `ReqDate': Unknown name.......)

And as we know we cannot add Purchase Quotation without Required Date

How can I solve this problem?

Please anyone can help me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 14 at 10:06 AM

    Hi,

    TaxDate is inferred from DocDate and ReqDate is inferred from DocDueDate. Unless you specifically need these dates to be different, you should not try to set them at all.

    Please remove the line $Quota->ReqDate="06/04/2018"; and test.

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you so much ANKIT, you solved my issue.

      The remaining one is UDF