‎2007 Aug 28 11:12 AM
Hi All,
I have a reqiurement where i need to create a contract using either of the function modules SD_SALESDOCUMENT_CREATE or BAPI_CONTRACT_CREATEFROMDATA but i want the data related to partner like sold-to-party in the contract to come from reference document no. but it is not taking values form that referenced document.
Message was edited by:
agarwal ashsih
‎2007 Aug 29 11:53 AM
Hi,
Look at the below code
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
* SALESDOCUMENT =
SALES_HEADER_IN = IT2_HEADER
* SALES_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE = ' '
* INT_NUMBER_ASSIGNMENT = ' '
* BEHAVE_WHEN_ERROR = ' '
* LOGIC_SWITCH = ' '
* BUSINESS_OBJECT = ' '
* TESTRUN =
* CONVERT_PARVW_AUART = ' '
* STATUS_BUFFER_REFRESH = 'X'
IMPORTING
SALESDOCUMENT_EX = IT2_SALESDOC
* SALES_HEADER_OUT = IT2_HEADERSALES
TABLES
RETURN = IT2_RETURN
SALES_ITEMS_IN = IT2_ORDERITEMSIN
* SALES_ITEMS_INX =
SALES_PARTNERS = IT2_ORDERPARTNERS
SALES_SCHEDULES_IN = IT2_ORDERSCHEDIN
* SALES_SCHEDULES_INX =
SALES_CONDITIONS_IN = IT2_CONDITIONS
* SALES_CFGS_REF =
* SALES_CFGS_INST =
* SALES_CFGS_PART_OF =
* SALES_CFGS_VALUE =
* SALES_CFGS_BLOB =
* SALES_CFGS_VK =
* SALES_CFGS_REFINST =
* SALES_CCARD =
SALES_TEXT = IT2_ORDERTEXT
* SALES_KEYS =
* SALES_CONTRACT_IN =
* SALES_CONTRACT_INX =
* EXTENSIONIN =
* PARTNERADDRESSES =
* SALES_SCHED_CONF_IN =
* ITEMS_EX =
* SCHEDULE_EX =
* BUSINESS_EX =
* INCOMPLETE_LOG =
* EXTENSIONEX =
* CONDITIONS_EX =
Regards
Sudheer
‎2007 Aug 29 12:01 PM
since u r referencing the document number ....enable
CONTRACT_HEADER_INX structure as 'x' along with the document no: field in the processing logic ....ok
REF_DOC VGBEL [ Document number of the reference document]
.......
reward points if helpful.....
‎2007 Aug 29 1:07 PM
Thanx for ur reply..
I have populated the referenced field but noe its showing me error : Contract Signed date not entered. Document not saved.
Kindly help me.