Validate Text Object/Id for sales Docs
Hi,
WE have aprogram that updates header and item texts for sales documents. The problem is that the users sometimes give the wrong Object/Id combinations for sales docs and the BAPI is not giveng any error messages. Is there any method to validate if a Textobject/Id is valid for a particular sales document type?
Regards,
Hari.
If you are modifying existing tables, In that case STXH and STXL are the only table that you can help you.
Else, fire a READ_TEXT and then see the output to see if its a valid parameter and do the SAVE_TEXT / BAPI whichever one you are doing.
Again, these paramaters are not specific to the ORDER TYPE.
Regards,
Ravi
Message was edited by: Ravikumar Allampallam
Similar Messages
-
Text determination procedure with sales doc type
For the Sales Doc type 'OR' , I am getting TEXT automatically in the Sales Order Header data , TEXT tab page.
Can Any one tell me how can I remove the text, when i create sales order.
Or please can any one give me the document or link or explain how the text determination procedure with sales doc type.Hi Sanjay,
Thanks for your help.
I managed to go there but I am really confused of what changes I have to do there.
If you dont mind can you explain a bit in detail.
Sorry for the trouble -
Unpermitted combination of business object BUS2032 and sales doc. category
Dear all
I try to create a sales document category L (Debit memo request) with the BAPI BAPI_SALESORDER_CREATEFROMDAT2
I get the error message: Unpermitted combination of business object BUS2032 and sales doc. category L
Is there a specific Bapi for creating this sales document?
HerbertMagic or not, but try something like this
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
EXPORTING
ORDER_HEADER_IN = lt_order_header_in
BUSINESS_OBJECT = 'BUS2096'
WITHOUT_COMMIT = ' '
IMPORTING
SALESDOCUMENT = l_vbeln
RETURN = li_return
TABLES
ORDER_ITEMS_IN = lt_order_items_in
ORDER_PARTNERS = lt_order_partners. -
Business Object Template for SALES ORDER
hi all,
how to get the business object template for sales order..iam able to get template for business partners but unable to get for sales order.... i have tried all the codings given, by still iam getting a error like
<?xml version="1.0" encoding="utf-8" ?>
- <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
- <env:Body>
- <env:Fault>
- <env:Code>
<env:Value>env:Receiver</env:Value>
- <env:Subcode>
<env:Value>-1</env:Value>
</env:Subcode>
</env:Code>
- <env:Reason>
<env:Text xml:lang="en">General Error</env:Text>
</env:Reason>
- <env:Detail>
<Command>GetBusinessObjectTemplate</Command>
<SessionID>DC703486-75R0-AD4D-97D1-0E80D8195155</SessionID>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>
my coding for getting business object template for sales order is
<WebMethod()> Public Function GetBusinessObjectTemplate(ByVal SessionID As String) As Xml.XmlDocument
Dim n As SBODI_Server.Node
Dim s, strXML As String
Dim d As Xml.XmlDocument
d = New Xml.XmlDocument
n = New SBODI_Server.Node
strXML = "<?xml version=""1.0"" encoding=""UTF-16""?>" & _
"<env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
"<env:Header>" & _
"<SessionID>" & CStr(SessionID) & "</SessionID>" & _
"</env:Header><env:Body><dis:GetBusinessObjectTemplate xmlns:dis=""http://www.sap.com/SBO/DIS"">" & _
"<Object>oOrders</Object>" & _
"</dis:GetBusinessObjectTemplate></env:Body></env:Envelope>"
s = n.Interact(strXML)
d.LoadXml(s)
Return (RemoveEnv(d))
End FunctionHi,
I need to pass object key or object type to a function module 'SAP_WAPI_WORKITEMS_TO_OBJECT'. This function module returns the worklist details(workflow inbox). In worklist details i need to use the field for workitem id.
Regards,
Gautham -
Update Delivery Text - As done for Sales order using RTEXT-SELKZ
Dear all,
We have to update the delivery header texts. But could not find the exact field name for the BDC .
The similar field name for Sales order is RTEXT-SELKZ.
Thanks in Advance,
Regards,
Vivek KHello,
if you need to update delivery header texts ,then you can get text data from input file .& then find out what's the text id where you have to insert text data.
Text id,object,language,Text name ,these 3 fields can help you from delivery.
Delivery-> display->header-> select particular text-> presss details icon->goto->header.This path will give text id ,object name details of the required text.
Then use function save_text to load this data for each delivery .
Hope this helps.
Thanks. -
Release strategy for sales docs.
dear all,
we have a process in sales ,that we create scheduling agreement or sales order .It will have to be released by 4 different people with different levels .Once released documents should not be modified by anyone except amendment procedure.
Pls suggest as to how to achieve this ...
thanks
shankarThis release procedure is not available in SAP for sales .
you can create Z*tcodes for this, for 4 diff ppl or levels
maintain the delivery block in sales order ( which will trigger directly from sales doc type)
in create sales order - made this "display mode"- by using transaction variant.
Now create
Z*
Tcode- ZLVL-1 -
a-Waiting for approval
b-approved level-1 - in this level, he can access only these 2 fields either a or b.
Tcode: ZLVL-2
c-approved level-2
similarly next 2 levels.
d- approved level-3
e-approved level-4
Give tcode authorization only for respective levels-
eg:level 1- ZLVL-1 n so on,
Now in sales order , userexit, write a logic
if the "delivery block " - approved Level-4 (E),
then , allow to save the sales order
or else trigger error mssg as " Not yet approved, cant save the document"-
hope it helps, without development i dont think its possible. -
Partner determination for sales doc header
Dear all
I assigned 2 SH to 1SP in customer master but in sales order system allowing manually to select any SH which is not assigned to SP.
waiting ur replyHi Lucky,
To map your requirement please use the following path:
IMG> Sales and Distribution> Basic Functions > Partner Determination> Set Up Partner Determination--> Select (Set Up Partner Determination for Sales Document Header). Here Select the Standard order & select Partner function in Procedure. Here against Ship-to-party Line you can see the ORIGINAL TABLE coloumn Here select "C" - Partner function from customer master (table KNVP).
By doing the above settings the system will allow only partners from Customer master records.
Hope this works for you.
REWARD if it helps you!!
Regards,
Ajinkya -
How to changeFI Doc type For Sales Doc
Hi Friends
Sales invoice creates FI document. I want to kow where this document type is maintained. I.E where we enter the document type for FI to be automaticallygenerated as a result of SD documents. Currently RV document type is generated for sales which i want to chane to zv
Thnaks
CHEERSHi Nitin,
Go to SPRO --> Sales and Distribution --> Billing --> Billing Documents --> Define Billing Types.
In this you find your billing type & and in the General control you will see the Document type. Theer whatever u want you can change the accounting Document type.
REgards
Ranjit -
Table which stores Object Status for Sales order
Hi Experts,
In Sales order header Status , there is a an object status when i click on that one it will take to new screen
It will show status with status no, and Status w/o Status no.
I want to know in which table this status will be saved.
Please let me know if my question is unclear.
Thanks,
Sunil kairam.Hi Vikranth,
I already check that but didn't find my answer in that.
I have these following status showing when i click on object status buttion.
No Stat Text
10 S10 Not approved (Finance)
20 S20 Only Down payment Allowed
30 S30 Eligible to Order Book Record
40 S40 Totally approved (Finance)
TECH Technically valid
EXEC Released for execution
BIOK Batch input success
FPD First Promised Date
FF Firm Forecas
Can you please tell me where this status will be stored?
Thanks,
Sunil kairam. -
How to pass header text in bapi for sale order
hai to all
i am using BAPI_SALESORDER_CREATEFROMDAT2 to create sale order
i can find order_text in tables parameters for creating item texts
but in my senario i have to maintain header text
please advice me how to proceed
rgds
vijayHi Vijay,
As I mentioned <b>it is very much possible to create sales order header text with this BAPI only</b>.
Just check out following working code:
REPORT yab_testso .
DATA: orderheaderin LIKE bapisdhd1,
orderitem TYPE TABLE OF bapisditm,
wa_orderitem TYPE bapisditm,
orderitemx TYPE TABLE OF bapisditmx,
wa_orderitemx TYPE bapisditmx,
orderpart TYPE TABLE OF bapiparnr,
wa_orderpartner TYPE bapiparnr,
ordertext TYPE TABLE OF bapisdtext,
wa_text TYPE bapisdtext,
orderret TYPE TABLE OF bapiret2,
wa_ret TYPE bapiret2,
lv_lines type i.
orderheaderin-doc_type = 'ZZOR'.
orderheaderin-sales_org = 'SS01'.
orderheaderin-distr_chan = 'SH'.
orderheaderin-division = 'ST'.
wa_orderpartner-partn_role = 'SP'.
wa_orderpartner-partn_numb = '1000000342'.
APPEND wa_orderpartner TO orderpart.
wa_orderpartner-partn_role = 'WE'.
wa_orderpartner-partn_numb = '1000000342'.
APPEND wa_orderpartner TO orderpart.
wa_orderitem-itm_number = '10'.
wa_orderitem-material = '000000111000000185'.
wa_orderitem-target_qty = '10'.
APPEND wa_orderitem TO orderitem.
wa_text-text_id = '0012'.
wa_text-langu = 'E'.
wa_text-text_line = 'Test for text creation'.
APPEND wa_text TO ordertext.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
order_header_in = orderheaderin
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT =
TABLES
return = orderret
order_items_in = orderitem
ORDER_ITEMS_INX =
order_partners = orderpart
ORDER_SCHEDULES_IN =
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
order_text = ordertext
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
describe table orderret lines lv_lines.
READ TABLE orderret into wa_ret index lv_lines.
IF wa_ret-type = 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / wa_ret-message_v2.
ENDIF.
Hope it helps.
Regards,
Akshay Bhagwat
Note: Pls reward points if this helps you. -
Validate Text Box value for ending spaces entered in a Custom 2010 InfoPath SharePoint 2010 form
I have Custom InfoPath form for added and editing items into a SharePoint 2010 list. For one of the fields I want to perform some data validation to make sure they did not add any spaces at the beginning or ending of the value they entered.
I have tried entering the pattern of "^\S(.*\S)?$" and it did not seem to work. Does anyone have any pattern that I would be able to use to check and see if the value entered in the text box contains any leading or trailing spaces
or a better solution for determining if there are leading or trailing spaces?You can just use the normalize-space() function.
So for example for the Title field on a list go into InfoPath and change the Default Value of that text box to, "normalize-space(Title)" without the quotes -
Field selection for sales doc.
Hi all,
I have a requirement to make some field/s as mendatory in Stock Transfer Orders without disturbing the purchase order settings.
another requirement is: where do we select the fields on Sales Document ex. OR - in OR i have to make customer required date field as mendatory. Kindly suggest or give path to solve these issues.
Thanks
ManojHi,
to make a field mandatory in a sales order, you can use t.code SHD0. Give the t.code as VA01, select the variant bus2032, you will get a list of fields with options to make them optional, mandatory or suppress. Select according to your requirement.
Pl reward if it helps.
Thanks,
Sadhu Kishore -
BOM not exploding for CR doc. type while creating sales order.
Hi Experts,
I have a problem in BOM. When created the BOM with sales doc. type OR, then BOM exploding as usual and picking pricing for main item.. But when I tried for sales doc. type CR, then the BOM is not being exploding and also pricing is also not picking. Can any one help me for this problem.
Thanks in advance,
Raksha.Hi,
Go to VTAF billing to sales document copy control and check below settings:
Header:
Data Transfer -052 Billing doc header
Data Transfer Buis - 103 Billing bus header data
Data Transfer Part - Billing Header Partner
Copying requirements - 021 Billing Header
Check Copy item number
Uncheck complete reference
Item:
Item Cat proposal G2N Request
Item TAN - Standard item
Data Transfer -153 item from Billing doc
Data Transfer Buis - 104 Billing bus Item data
Data Transfer Part - 004 Billing Item Partner
bl.pl - Leave it blank
Copying requirements - 303 Billing Header
uncheck copy schedule lines and do not copy batch
check update document flow
Pricing type - D
Leave blank - Campaign Deter.
Points to add: If you create without reference to an invoice then it would not explode BOM in RE return order because the configuration not set in REN item category.
As a standard business process return orders always create with reference to invoice.
regards
rc gopi -
How to validate sales doc with its sales area
Hi experts,
how can i check perticular sales doc is extended to its sales area.
i need to do validation for sales doc against sales area.
which table do i need to use for this,
Thanks,
NeoYou can use VBAk Table
Thanks
Seshu -
Delete a line item from Sales Doc type RE
Unable to delete a line item from a sales order linked to document type RE. Get a long runtime - no specific error message. Use the 'Stop Transaction' option to end the transaction.
Have done thorough testing and can delete line items linked to all other sales document types in our system.
Researched SPRO to see if there was a line item deletion option that was not created for sales doc type RE - but can find nothing.
On a critical time line here - this was discovered during Hotpak installation testing which is scheduled to move to PRD June 22. Question as to why we have not run across this issue before now?? - I don't think we have had an occasion to delete a returns line item before - but I want to have the option if available.
Any help to resolve this issue would be appreciated.
Regards
PatsyThanks for your response.
After creating document type RE, execute VA02 transaction, select line item, select delete line item icon. The system goes into runtime and just stays there. No error message, no abap dump. To escape the transaction, I have to select 'stop transaction'.
I have tested all other document types we use in our system, (including our customized transactions) SO, CR, DR, etc., and the system allows line item deletion.
Maybe you are looking for
-
CMP Entity Bean with ejb-ql finder methods and INFORMIX database
Hi, I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like: <entity> <abstract-schema-name>BeanName</abstract-schema-name> <cmp-field><field-name>fieldOne</
-
Problem with rerendering h:panelGrid with rendered attribute
Hi, I am new to jsf and trying to learn its features as I find it easy and fast for development purpose.I have been developing with jsf for past few weeks and got myself stuck with a problem, tired of which I had to take the forum's help :). My probl
-
Page preview displaying iViews incorrectly
I am just learning Portal and have run into an issue that I'm sure folks out here can help me with. I created two iViews from the SAP iView transaction template. Both transactions are custom transactions, pointing to custom Z-programs reports. I h
-
IMessage arrive at 3 Phones same time
I´ve 3 iPhones (3GS, 4 and 4S) on the same apple ID. Now I get iMessage on all 3 Phones? Do somebody know this Problem? thx
-
CommandLink action not being invoked
HI: I have a page with panelGrid, which has three inputText and one selectOneMenu, all of which have a validator ( a method in the backing bean). All these are followed by a commandLink button with a 'action' method in the same backing bean. Problem