cancel
Showing results for 
Search instead for 
Did you mean: 

Requesting Sample Code for Creating Asset Master via SAP SOAP API

huny
Explorer
0 Kudos
249

Hello Cummunity!

Fixed Asset - Create Main Asset (Asynchronous)

https://api.sap.com/api/FIXEDASSETCREATEMAIN/overview

I would like to test creating an asset master in the Soap API. Could you provide sample code that I can use for testing?

I input it as shown below, but I keep getting an error.

huny_0-1720758020930.png

huny_1-1720758044311.png

Error message:

huny_2-1720758074656.png

I would appreciate your help.

Huny

 

View Entire Topic
PANTELIS
Product and Topic Expert
Product and Topic Expert

Hi Huny,

based on your screenshots, I believe you are using postman. Please find below a basic sample payload:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fi="http://sap.com/xi/FI-AA">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    	<wsa:Action>http://sap.com/xi/FI-AA/FixedAssetCreateMainBulkRequest_In/FixedAssetCreateMainBulkRequest_InRequest</wsa:Action>
    	<wsa:MessageID>uuid:12345678-90AB-CDEF-0123-202407010001</wsa:MessageID>
    </soapenv:Header>
    <soapenv:Body>
        <fi:FixedAssetCreateMainBulkRequestMessage>
            <MessageHeader>
                <ID>Z_Asset_1</ID>
                <CreationDateTime>2024-06-30T09:00:00-08:00</CreationDateTime>
                <SenderBusinessSystemID>POSTMAN_TEST</SenderBusinessSystemID>
            </MessageHeader>
            <FixedAssetMainRequest>
                <MessageHeader>
                    <CreationDateTime>2024-07-01T09:00:00-08:00</CreationDateTime>
                </MessageHeader>
                <FixedAsset>
                    <CompanyCode>1710</CompanyCode>
                    <AssetClass>3200</AssetClass>
                    <AssetIsForPostCapitalization>false</AssetIsForPostCapitalization>
                    <General>
                    	<FixedAssetDescription>Z_asset_1</FixedAssetDescription>
                    </General>
                    <AccountAssignment>
                        <ProfitCenter>YB900</ProfitCenter>
                        <Segment>1000_C</Segment>
                    </AccountAssignment>
                </FixedAsset>
            </FixedAssetMainRequest>
        </fi:FixedAssetCreateMainBulkRequestMessage>
    </soapenv:Body>
</soapenv:Envelope>

 

The value of SenderBusinessSystemID (POSTMAN_TEST in the sample above) must match the Business System field that you defined in the communication system of this communication arrangement. I highly recommend that you can also leverage the Message Monitoring and Error Handling option.

Finally, as mentioned in the API documentation help page, to activate this inbound service, you also have to activate the corresponding outbound service Fixed Asset - Create Main Asset (Asynchronous) Confirmation.

Best regards,

Pantelis

huny
Explorer
0 Kudos
Pantelis! Thanks for your help!