How to handle expired contract ?
Dear expert,
our system has lots of expired contracts, can we archive them? will there any impact if the contract is archived? is this a right way to deal with the expired contracts?
Thanks!
Hedy
Dear expert,
our system has lots of expired contracts, can we archive them? will there any impact if the contract is archived? is this a right way to deal with the expired contracts?
Thanks!
Hedy
Similar Messages
-
How to handle expired sessions in portals
Hai all,
we have implemented a logic which is given in the following blog (to handle expired sessions).
(Blog from--Thomas Jung)
/people/thomas.jung3/blog/2004/12/06/bsp-developers-journal-part-xv--stateful-bsp-and-timeouts
this is working fine when we run application from workbench organizer.but when i run the same application through Portal,it was failed.
if someone comeacross this situation please kindly send your comments and solution to this problem.
Thanks in advance,
Innu.Hai Durai,
Thanks for the immediate response.
Here i will give the clear idea about the failure situation.
IF gv_load IS INITIAL.
DATA: fields TYPE tihttpnvp.
FIELD-SYMBOLS: <wa_fields> LIKE LINE OF fields.
CALL METHOD request->get_form_fields
CHANGING
fields = fields.
LOOP AT fields ASSIGNING <wa_fields>.
IF <wa_fields>-name CS 'htmlb' OR
<wa_fields>-name CS 'HTMLB'.
gv_load = '-'. "False - Problem with ABAP_FALSE
appearing the same as initial.
ENDIF.
ENDLOOP.
IF gv_load IS INITIAL.
gv_load = abap_true.
ENDIF.
ENDIF.
IF gv_load NE abap_true.
DATA: url TYPE string.
DATA: page TYPE string.
page = 'reload.htm'.
DATA: params TYPE tihttpnvp.
FIELD-SYMBOLS: <wa_params> LIKE LINE OF params.
APPEND INITIAL LINE TO params ASSIGNING <wa_params>.
<wa_params>-name = 'url1'.
CONCATENATE 'http://sapcrmdev.server.com:8080/sap/bc/bsp/sap/'
'salesord/default.htm'
INTO <wa_params>-value.
CONCATENATE ' ' ' ' INTO <wa_params>-value.
<b> CALL METHOD
cl_http_ext_webapp=>create_url_for_bsp_application
EXPORTING
bsp_application = 'SALESORD'
bsp_start_page = page
bsp_start_parameters = params
IMPORTING
abs_url = url.
navigation->exit( url ).
ENDIF.</b>
The imported parameter URL,which loads the reload page with parameter URL1.
Exactly here i am getting the problem.
[My application is launching through iViews as external services.Clearly, when i launch the portals that displays different bsp applications as menu options.when i click on my application that opens another window and from there on my application runs in that window.]
As we are constructing URL1 above, we are unable to construct Portal url to reload from reload page.]
so what should exactly i send value through url1 parameter to launch my application through portal..?
if you have any sample code plz send.
Thanks,
Innu. -
Using LSMW how to handle Value contracts create/change (VA41) /(VA42)
Hi Experts,
Please suggest me how to create and change of value contracts using LSMW.
Actually i got one standard batch input program RVINVB10 in LSMW for create/change for value contracts. but the problem is one field ZWERT - Target Value in Document Currency is not present in the Target structure at item level.
ZWERT - Target Value in Document Currency field is required for my scenario.
Points will be awarded for the Correct answers.
Regards,
Tirumala ReddyHi Ramky,
Thanks for your response.
In LSMW first we have to map all source structure fields to Target structure fields right, ZWERT field is there in my source structure and there is no field matching with ZWERT in the Target structure.
Field name :ZWERT
Field Description: Target Value in document currency.
If you know solution please reply me soon.
Regards,
Tirumala Reddy -
How to not display expired contract on Web-UI in SRM-MDM ?
Hi,
Our business is as following:
the contract is published to SRM-MDM V3.0, but if contract is expired, when I select the content from catalog to create sc, then this kind of contract should not display on catalog, how to do ?
SRM7.0 MDM7.1SP04 SRM-MDM v3
thanks
JesseHI, Bala
You are right , My case is not what you mean.
I transfer valid contract from SRM to Mdm catalog, maybe after several months ,the contract is expired compare to today, I don't expect this kind of contract display on the catalog UI to mislead the user.
Of course, I know how to prevent user to creat SC with selected expired contract by BADI, But I think that is not good idea.
Actually , I can also solve this issue by development in SRM BADI and MDM , expired contract will not display in catalog, but that will make many changes compared with standar function.
I wonder whether SAP have the better solution.
Thanks
Jesse. -
How to avoid sales order creation for expired contract
Hello,
Is there any way to prevent creation of sale order reference to expired contract?
Please suggest.
Thanks,Hi,
As Shadu says, create your own VOFM subroutine using '001' as a model and set it in VTAA. You can see in this subroutine this coding:
* Check the validity period of the reference document
if vbak-angdt > 0 and
vbak-angdt > sy-datlo.
write vbak-angdt to bp_datum_ausgabe.
message w008 with bp_datum_ausgabe.
endif.
Replace the warning message (it's hardcoded) by other and use the field of date that you need.
If you need something else, dont hesitate to tell us.
Regards,
Eduardo -
How to handle password changes if we implement singlesignon between BO& BI7
Hi,
As we know ,we can implement single signon between BO and SAP BI 7, by importing roles and users through CMC and by selecting the option "Use Single signon during report refresh time".
My doubt here is, When we import roles from SAP and Auto import the users, is it only the SAP usernames that are stored in BO repository or both username and password. If second case holds true then how to handle/manage password change for a user who is already imported in BO sometime back?
Would the password changes be reflected automatically in BO?
Please guide me if you think that I'm thinking in a wrong direction.Hi Naresh,
password changes are reflected automatically in BO. BO just forwards the data to the SAP side and it does the real authentification.
Regards,
Stratos
PS: Keep in mind that you cannot change the SAP password on the BO login screen if your SAP password has expired. You have to do this with the SAP client (SAP GUI) -
HOW TO HANDLE MULTIPLE VALUES IN BDC FOR A PARTICULAR FIELD.
I THINK IT IS HANDLING OF TABLE CONTROLS IN BDC
PLEASE LET KNOW WHETHER THESE TWO ARE SAME CONCEPT OR NOT
HOW TO HANDLE TABLE CONTROLS IN BDC
Moderator message - Please do not use all caps. Please do not ask interview questions - post locked
Edited by: Rob Burbank on Jun 26, 2009 10:02 AMHi,
To handle table control in BDC you will have to enter at least one record in the table control and there after use the index number to increment to the next line item.
Say you run a recording for a transaction which has a table control (ME21), here after you have completed the recording, you'll see the code which will have sometjing like <fieldname>(01) and the entered value. that valeu has been entered as the first line item (01 being the index).
You will have to replace the hard coded line item index with a variable and inside a loop increment the item index. Once you reach the maximum allowed line items on your screen juct press the pagedown button (or insert new row) and reset the index to 1.
Following is a code snippet I used while uploading data for ME31K (vendor contract). It is not the complete code but does show how your code needs to be changed with using index for line items.
Here we assumne that the maximun number of lines displayed at a time on the screen is 14.
<< Unformatable code removed >>
Hope this helps.
Regards,
Sachin
Edited by: Rob Burbank on Jun 26, 2009 10:03 AM -
How to handle sub subcontracting in SAP B1 ?
Dear all,
How to handle sub subcontracting in SAP B1 ?
Let me explain in detail,
My client doing sub contracting work for parent company,raw material is actually received from parent company
thru 57F4 challan,raw material sent for further processes in my client company and later converted material
is sent to a sub contractor for finishing thru 57F4 challan,after finishing material is recieved by client company,
send it once again to parent company.In this process raw material is received as X and send it to parent company as Y.
My question is, How to handle sub sub contracting items stock ?
Expecting u all valuable ideas / suggestions.
Jeyakanthanhai!
Will u raise any bill for ths. i mean ur child cmpny to parent cmpny.?
1. Receive the items to your child cmpny through GRPO or GR
2. Use Production Order cycle to do FG.
3. Define BOM or use Special Production
4. Transfer to the Sub- contarct warehouse through Inv.Transfer.
5. once after processing over, book inv.Transfer to you good down.
6. Use Goods Return or GR to issue the item out to parent company.
hope it gvs u a starting.. -
How to handle Supplementary Bills
Hi all,
Can any one suggest me how to handle the supplementary bills in indian localization?
The concept is encountered in cases when companies follow contract agreements in sales and purchase. To provide a breif description of the scenario: A contract prevails with a vendor from a period of 1st april to 30th June for an item A @ Rs. 30. Now all the bills generated within this period is raised at the said rate along with taxations. The contract is liable for renewal from 1st July but the process take time and the new rates are available on 25th July but effective from 1st July @ Rs. 40. Now the bills generated from the period of 1st July to 24th July has been raised at the old rate as new rates were not available. On 25th July, the company raises a supplementary bill for the difference amount i.e. Rs 10 x Qty billed from 1st july to 25th july. Now this will efect the taxation also. In case of a cost raise the tax accounts shall be debited and the stock accounts shall have to be revaluated for the item. In case of a reduction the tax accounts have to be credited and the stock account has to be revaluated for those items. However, though this has an effect on the stock value it does not have any effect in the stock quantity.
How to map this in SAP Business One? This has been a standard practice in any manufacturing industry now a days and I am seeking for any one who has done it. Please share a solution.
Regards,
RajHello,
still not get proper answer for this prob.
It is very complax issue for handing in SAP .
i think it can handle making nos of AccountAmount reconcialation , inventory tracking(phsical stock tracking) and service invoice .
and result based on your client Accountant and your clear explaination.
You have only one opion make credit note make with respective excise docuemnt .but whenever you receive bill you have issued qouantiy in production floor.otherwise make all document again..
Thanks
Manvendra Singh Niranjan -
Hello Experts,
I have a query regarding the usage of purchase contracts.
As a company, if I sign a contract with my vendor for a year, my contract will expire after that.
Should I be able to use this expired contract till I renew it?
I understand it is illegal to use an expired contract even for one day after the actual validity period. Is this opinion correct?
And is it the same for any industry irrespective of the size or the vertical it belongs to?
Kindly let me know how this is supposed to be.
Best Regards,
VidhyaHello Vidhya,
Your query looks more towards business angle.
Yes.It is illegal to use the expired contract or after validity.
If we talk about SRM
you can change the validity.
Or you can create new contract wrt old contract
or you have option to create a Bid Invitation for expired contract to finalise the new contract
BR
Dinesh -
How to handle vendor discounts based on the qty / value procured.
Hello
How to handle vendor discounts based on the qty / value procured.
a. Scenario: you have entered into a contract with vendor that you will buy goods worth Rs 10000/- and if you buy goods worth more than 100000 the vendor says he will give a discount of Rs 5000/- @ the end of the year.
i) How to handle this sceneriou2019s with SAu2019s
ii) What does STD SAP offer.
Regards
Sapman manHi,
For the discucount condition type, you have to maintain scales.
Take Condition type - Discount Value ( RB00)
Discount Value ( RB00) - Means Fixed discount. For this condition type, you have to maintain Scale basis as Value scale 'B' in the condition type customization.
Transcation : M/06
Select your condition type RB00 and click on the details icon.
In the Scales block, you have to maintain and save.Calculation type = Fixed amount
Scale basis = Value scale 'B'
For this condition type, you have to maintain scales in the inforecord.
Transcation : ME12
Select this condition type, click on the Scales icon. There you have to maintain like
From : 10,0000 Rate: 5000.
It means, if the document value is reached 10,0000 then discount is 5000rs. If the value islessthen the 10,0000 then no discount.
Regards
KRK -
How to handle Back button, Browser Refresh problem at server side.
Hi Friends,
How to handle Back button, Browser Refresh problem at server side in java?.
I am able to trace that,
request.getHeader("ACCEPT") is returning value- */*
when the browser was refreshed and returning different MIME types
for all other actions from browser.
I have doubt, will the above solution works always for all servers,browsers?.
Please also specify any solution to handle back button at server side?.
Thanks in Advance.
Venkat..I'm sorry I don't think tht's the right solution for
the above question....
We must be aware that whatever scripting methdologies
we either javascript/vbscript would executed @
client(browser) side not @ server side....
Dud If U get a good solution keep me updated.....
THANKS & REGARDS,
RAHULMy dear friend ...
the bad news is that u simply cant disable or add any listener to the back button of the browser.
When u hit the back button of ur browser the URL gets re-executed. So in case u have a JSP then the history.forward() is the best solution. [only if the page doesnt get expired similar to secure https sites]
Now dont say that user can have javascript disabled ...those users will have a pretty touch time browsing websites since javascripts r used extensively by almost all websites.
But in case u have an action.do or servlet call then u need to manage it using a session variable since the request will be sent to the server rather than client.
For multiple form submittion issues read the following article in javaworld...
Client vs. server solutions
Different solutions can solve this multiple form submission situation. Some transactional sites simply warn the user to wait for a response after submitting and not to submit twice. More sophisticated solutions involve either client scripting or server programming.
In the client-only strategy, a flag is set on the first submission, and, from then on, the submit button is disabled based on this flag. While appropriate in some situations, this strategy is more or less browser dependent and not as dependable as server solutions.
For a server-based solution, the Synchronizer Token pattern (from Core J2EE Patterns) can be applied, which requires minimal contribution from the client side. The basic idea is to set a token in a session variable before returning a transactional page to the client. This page carries the token inside a hidden field. Upon submission, request processing first tests for the presence of a valid token in the request parameter by comparing it with the one registered in the session. If the token is valid, processing can continue normally, otherwise an alternate course of action is taken. After testing, the token resets to null to prevent subsequent submissions until a new token is saved in the session, which must be done at the appropriate time based on the desired application flow of control.
for more details refer :
http://www.javaworld.com/javaworld/javatips/jw-javatip136.html
Hope u got the idea.
FYI I have been using both these ideas in my credit card payment gateway project. This concept has worked really well. -
Removal of Expired contract type
Hello friends,
My client requirment is expired contract type should be removed from the list. They are saying, 'The Accounts team some time selects that contract for raising invoice instead of new contract created for the same rental object.
How can we resolve this issue
Thanks in advance
Regards,
Reva NaikHello Reva,
could you please add some details where exactly the expired contracts should not be shown?
Thanks.
Regards, Franz -
How to handle exception CX_SY_REF_IS_INITIAL
hi experts,
im working on a test scenario for abap mapping in SAP XI im getting this error
An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference
i understand that i need to catch this exception in the abap coding but i'm not familiar with oops concepts
can any one please suggest me how to handle this exception for the following code...
method IF_MAPPING~EXECUTE.
break x1149.
* initialize iXML
TYPE-POOLS: ixml.
class cl_ixml definition load.
** Instances & Variable declaration =======================
* instance main factory
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
* instance input stream factory
l_streamfactory TYPE REF TO if_ixml_stream_factory,
* instance input stream
l_istream TYPE REF TO if_ixml_istream,
* instance input document
l_document TYPE REF TO if_ixml_document,
* instance parse input document
l_parser TYPE REF TO if_ixml_parser,
* instance for elements within the nodes
node TYPE REF TO if_ixml_node,
*instance of nodemap
nodemap TYPE REF TO if_ixml_named_node_map,
* instance for iterator
iterator TYPE REF TO if_ixml_node_iterator,
name TYPE string,
value TYPE string,
* instance main factory
o_ixml TYPE REF TO if_ixml,
* instance output document
o_document TYPE REF TO if_ixml_document,
* instance output stream
o_istream TYPE REF TO if_ixml_ostream,
* instance parse output document
o_parser TYPE REF TO if_ixml_parser,
* instance fot renderer
renderer type ref to if_ixml_renderer,
irc type i,
l_xml_size TYPE i,
*ROOT ELEMENT
l_element_MT_DEMANDTEC_COST TYPE REF TO if_ixml_element,
*NEXT CHILD ELEMENT FROM THE ABOVE PARENT
l_element_DT_DEMANDTEC TYPE REF TO if_ixml_element,
*CHILDREN1 ELEMENT FOR DT_DEMANDTEC
l_element_DT_WHSE TYPE REF TO if_ixml_element,
*CHILDREN2 ELEMENT FOR DT_DEMANDTEC
l_element_DT_DC TYPE REF TO if_ixml_element,
*CHILDREN3 ELEMENT FOR DT_DEMANDTEC
l_element_DT_PLANT TYPE REF TO if_ixml_element,
*CHILDREN4 ELEMENT FOR DT_DEMANDTEC
l_element_DT_QTY TYPE REF TO if_ixml_element.
*saving the xml document
DATA: l_xml_table TYPE TABLE OF t_xml_line.
types: begin of t_source,
whse(5),
dc(4) ,
plant(4),
qty type i,
end of t_source.
types: tt_source TYPE STANDARD TABLE OF t_source.
data: wa_source type t_source.
data: it_source TYPE tt_source,
ivalue type string.
* Procedures and business logic =======================================
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
* create input stream
l_istream = l_streamfactory->create_istream_xstring( source ).
* initialize input document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* parse input document
l_parser->parse( ).
* Validate a document
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
refresh : it_source.
node ?= l_document.
CHECK NOT node IS INITIAL.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WHEN if_ixml_node=>co_node_text.
* text node
value = node->get_value( ).
if name eq 'DT_WHSE'.
wa_source-whse = value.
ELSEIF name eq 'DT_DC'.
wa_source-DC = value.
ELSEIF name eq 'DT_PLANT'.
wa_source-PLANT = value.
ELSEIF name eq 'DT_QTY'.
wa_source-QTY = value.
COLLECT wa_source INto it_source.
CLEAR wa_source.
ENDIF.
endcase.
node = iterator->get_next( ).
endwhile.
ENDIF.
loop at it_source into wa_source .
at first.
* Creating a ixml factory
o_ixml = cl_ixml=>create( ).
* Creating the dom object model
o_document = l_ixml->create_document( ).
endat.
* Build and Fill root node MT_DEMANDTEC_COST
AT FIRST.
l_element_MT_DEMANDTEC_COST =
O_document->create_simple_element(
name = 'MT_DEMANDTEC_COST'
parent = o_document ).
ENDAT.
* Build and Fill Child node DT_DEMANDTEC for parent
* MT_DEMANDTEC_COST
l_element_DT_DEMANDTEC = O_document->create_simple_element(
name = 'DT_DEMANDTEC'
parent = l_element_MT_DEMANDTEC_COST ).
* Build and Fill Child node1 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-WHSE.
l_element_DT_WHSE = O_document->create_simple_element(
name = 'DT_WHSE'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node2 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-DC.
l_element_DT_DC = O_document->create_simple_element(
name = 'DT_DC'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node3 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-PLANT.
l_element_DT_PLANT = O_document->create_simple_element(
name = 'DT_PLANT'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node4 DT_QTY for parent DT_DEMANDTEC
ivalue = wa_source-QTY.
l_element_DT_QTY = O_document->create_simple_element(
name = 'DT_QTY'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
endloop.
* render document ======================================================
* create output stream
o_istream = l_streamfactory->create_ostream_xstring( result ).
* Connect internal XML table to stream factory
o_istream = l_streamfactory->create_ostream_itable( table =
l_xml_table ).
renderer = o_ixml->create_renderer( ostream = o_istream
document = o_document ).
irc = renderer->render( ).
* how do i catch the exception for type CX_SY_REF_IS_INITIAL ...?
endmethod.
full reward points for answers.
Thanks & Regards,
Uday Kumar.
Edited by: UDAY on May 6, 2008 9:32 PMHi Uday,
Its occurs because you're trying to access a objects with null reference. Or you forgot to create an instance or an error occurs during the instance creation. So You should put all your "Procedures and business logic" inside a Try/catch block. as follow.
" Define a class exception object to get error message......
DATA o_exception TYPE REF TO cx_sy_ref_is_initial.
"// Use the statment Try block to catch the error.
TRY.
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
* create input stream
l_istream = l_streamfactory->create_istream_xstring( source ).
* initialize input document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* parse input document
l_parser->parse( ).
* Validate a document
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
refresh : it_source.
node ?= l_document.
CHECK NOT node IS INITIAL.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WHEN if_ixml_node=>co_node_text.
* text node
value = node->get_value( ).
if name eq 'DT_WHSE'.
wa_source-whse = value.
ELSEIF name eq 'DT_DC'.
wa_source-DC = value.
ELSEIF name eq 'DT_PLANT'.
wa_source-PLANT = value.
ELSEIF name eq 'DT_QTY'.
wa_source-QTY = value.
COLLECT wa_source INto it_source.
CLEAR wa_source.
ENDIF.
endcase.
node = iterator->get_next( ).
endwhile.
ENDIF.
loop at it_source into wa_source .
at first.
* Creating a ixml factory
o_ixml = cl_ixml=>create( ).
* Creating the dom object model
o_document = l_ixml->create_document( ).
endat.
* Build and Fill root node MT_DEMANDTEC_COST
AT FIRST.
l_element_MT_DEMANDTEC_COST =
O_document->create_simple_element(
name = 'MT_DEMANDTEC_COST'
parent = o_document ).
ENDAT.
* Build and Fill Child node DT_DEMANDTEC for parent
* MT_DEMANDTEC_COST
l_element_DT_DEMANDTEC = O_document->create_simple_element(
name = 'DT_DEMANDTEC'
parent = l_element_MT_DEMANDTEC_COST ).
* Build and Fill Child node1 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-WHSE.
l_element_DT_WHSE = O_document->create_simple_element(
name = 'DT_WHSE'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node2 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-DC.
l_element_DT_DC = O_document->create_simple_element(
name = 'DT_DC'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node3 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-PLANT.
l_element_DT_PLANT = O_document->create_simple_element(
name = 'DT_PLANT'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node4 DT_QTY for parent DT_DEMANDTEC
ivalue = wa_source-QTY.
l_element_DT_QTY = O_document->create_simple_element(
name = 'DT_QTY'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
endloop.
* render document ======================================================
* create output stream
o_istream = l_streamfactory->create_ostream_xstring( result ).
* Connect internal XML table to stream factory
o_istream = l_streamfactory->create_ostream_itable( table =
l_xml_table ).
renderer = o_ixml->create_renderer( ostream = o_istream
document = o_document ).
irc = renderer->render( ).
" The Statement CATCH define a block that catches the exceptions of the
" exception class cx_sy_ref_is_initial
CATCH cx_sy_ref_is_initial INTO o_exception.
" If you need to get the error message text do as follow
DATA errorMsg type string.
" Get the message text
errorMsg = o_exception->GET_TEXT( ).
" Display the error information
MESSAGE errorMsg TYPE 'I'.
ENDTRY.
The TRY block defines a guarded area whose class-based exceptions can be caught in the subsequent CATCH blocks. If no exception occurs in the TRY block and it reaches its end, the system continues the processing after ENDTRY. If a class-based exception occurs in the TRY block, the system searches for an exception handler in the same or an external TRY control structure.
Font: SAP Help
You can see a how to create and use an exception in this example [ ABAP Objects - Defining a Class-based exceptions|https://wiki.sdn.sap.com/wiki/x/19w] .
Best Regards.
Marcelo Ramos -
How to handle null values in RTF templates
Hi - I have two groups in a report for different SQL and two formulas for each group, CF_ELE_CNT and CF_ELE_CNT1. In the template I use the below code to print or not print a section.
<?if:number(CF_ELE_CNT +CF_ELE_CNT1) >0?>
The problem is when there is no data in the second group its not creating the XML tag for CF_ELE_CNT1, though CF_ELE_CNT has 13, it still does not print that partucular section. If I remove CF_ELE_CNT1 from the condition it works fine. I was wondering how to handle this.
Any help would be appreciated!!
Thanks,
RavHey Rav,
You can add a check to identify it the element/tag is present or not
<?if:(CF_ELE_CNT1)?> will give true, if the element is present otherwise falsesince you are adding the two elements, you have to add a or condition.
<?if:(CF_ELE_CNT and number(CF_ELE_CNT) >0 ) or ( CF_ELE_CNT1 and CF_ELE_CNT1 >0)?>
Maybe you are looking for
-
Howdy So I have 2 store accounts, as I travel and live between two countries. I have been using this accounts for at least 6 years. I regularly swap between the two, depending on which country I am in. I have never encountered any issues, I buy, r
-
How can i get my shuffle to show up as a device on itunes
My ipod shuffle neither shows up in "computer" in windows 7. There is also no indication on the itunes page showing that the device, the shuffle, is installed. The itunes has been reloaded. Result did not change. Have followed Apple instruc
-
To anyone familiar with iPad 2s, After I select the Sunflower Photo icon and touch 'Edit', apply check marks to specific photos I want deleted, the red 'Delete button doesn't function. How do I correct this? Thanks
-
Page setup...
I have just upgraded from photoshop cs2 to cs4 (Windows XP), and am experiencing a few problems. If I want to print a 20" x 30" image on my Epson 7600, centered on a 24" x 34" sheet cut from the roll, I enter the 2400 x 3400 page size specifications
-
Caching Server - Caching Mavericks Installer
Is there a way to allow the caching server in Server 3.0 to cache Mavericks 10.9 to limit external bandwidth?