ADRC DATE_FROM DATE_TO
Hi experts,
We want to download address (customer and supplier) from SAP R/3 4.7 to a specific application (TMS).
In the adrc table, it exists 2 fields Date_from Date_to.
Can you advice how this fields are feed ? Is it a customizing point to activate the feed of this field ?
Thanks in advance for your response ?
Christophe
Not sure about the release 4.7, but in ECC 6.0 these fields are not being used. If you look at the table definition in SE11 you'll see the field description:
DATE_FROM AD_DATE_FR Valid-from date - in current Release only 00010101 possible
DATE_TO Valid-to date in current Release only 99991231 possible
You could do a quick check in SE16 if there are any other values in those fields in your system. This table is being used in many areas of SAP and, to my knowledge, there is no SD configuration to turn on/off "versions" of the customer address.
Similar Messages
-
Update the Street field in ADRC table.
Hello !! Please I need some help.
I have to update the Street field in ADRC table.
I have this list.
Where I can put a Flag and an Update to do it.
Im really newbie. Im doing it in IDES, to test it first.
Help !
REPORT Z_LIST_ADRC LINE-SIZE 190
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES: ADRC.
DATA: BEGIN OF ITAB OCCURS 0,
ADDRNUMBER LIKE ADRC-ADDRNUMBER,
date_to like ADRC-date_to,
NAME1 LIKE ADRC-NAME1,
CITY1 LIKE ADRC-CITY1,
CITY2 LIKE ADRC-CITY2,
STREET LIKE ADRC-STREET,
MC_NAME1 LIKE ADRC-MC_NAME1,
MC_CITY1 LIKE ADRC-MC_CITY1,
MC_STREET LIKE ADRC-MC_STREET,
END OF ITAB.
SELECT ADDRNUMBER DATE_TO NAME1 CITY1 CITY2 STREET MC_NAME1 MC_CITY1 MC_STREET
FROM ADRC INTO TABLE ITAB.
LOOP AT ITAB.
WRITE : /001 ITAB-ADDRNUMBER,
007 ITAB-DATE_TO,
016 ITAB-NAME1,
040 ITAB-CITY1,
070 ITAB-CITY2,
090 ITAB-STREET,
120 ITAB-MC_NAME1,
150 ITAB-MC_CITY1,
170 ITAB-MC_STREET.
ENDLOOP.
TOP-OF-PAGE.
ULINE.
WRITE: /001 'n-addr',
007 'date',
016 'name',
040 'city1',
070 'city2',
090 'street',
120 'name-s',
150 'city1-s',
170 'city2-s'.
ULINE.HI,
data : itab like standard table of adrc.
select * from adrc into table itab.
loop at itab.
itab-street2 = 'New value'.
modify itab index sy-tabix.
endloop.
if not itab[] is initial.
modify adrc from table itab.
endif. -
Partner Relationship for Product
Hi,
I have added partner relationship for product with specific start/end dates values (In my case, I added driver relationship for vehicle through CIC0 transaction).
Through transaction only date (without time) is displayed, while in database the fields DATE_FROM, DATE_TO are stored as timestamps (Which means both date and time value).
I want to manage the relationships in lower level and allow different partners of same partner function on the same day, but in different hours.
Is it possible to define the date range of partners relationships as date+time instead of date only, or only date (without time) is being taken into account (and therefore such change is meaningless)?A few extras, please reward points.
Tables
Access to table information is controlled across the system by GUID values. These are Global Unique Identifiers.
In general:
CRMCxxxx = Customising
CRMTxxxx = Customising
CRMDxxxx = transactional
BUT* = Customer Master
CRMD_ORDERADM_H = Document Header Table
CRMD_ORDERADM_I = Document Line item Table
CRMD_LINK = Lists various link GUIDs, to
access order Information
CRMD_PARTNER = Partner Table
BUT000 = ~KNA1 Customer Master General Data
BUT020 = Address Link Table
ADRC = Address Details (Master Data)
ADRV = Address Details (unique to orders)
CRMC_PARTNER_FT = Partner function Description
PRCD_COND = Pricing Conditions
CRM_JEST = Status Table
COMM_PRODUCT = Materials General Table
SCATTSEG = Valid from/ Valid to
CRMD_SALES = Sales Data
(reference data)
CRMD_SCHEDLIN = Schedule Line item
CRMD_ORGMAN = Organisational Data
CRMD_PRODUCT_I = Line item product detail
PROCESS_QTY_UNIT (EUR)
Example: You want to list all complaints that partner no 31 appears as a header partner, and the partner functions:
Select PARTNER_GUID from the table BUT000.
Get all instances of that partner in the order/partner table:
Select GUID PARTNER_FCT from CRMD_PARTNER
Where PARTNER_NO = BUT000-PARTNER_GUID.
Then get the order guid from the link table:
Select GUID_HI from CRMD_LINK
Where GUID_SET = CRMD_PARTNER-GUID.
Get the Order No:
Select OBJECT_ID from CRMD_ORDERADM_H
Where GUID = CRMD_LINK-GUID_SET.
Link Table:
_HI refers to a Order Header or Order Line Item
GUID_HI = Header/ Line item Guid
OBJTYPE_HI = 05 = Header
06 = Line item
_SET refers to the subset of data
GUID_SET = Subset GUID
OBJTYPE_SET = 07 = Partners
11 = Sales
21 = Orgman
29 = Subject -
Unable to print address labels in SMARTFORMS.
Hi.
I am facing a problem during the printing of address labels from table ADRC in SMARTFORMS.
I would like describe my issue in detail.
In my Global Defininations, I have Types---->
TYPES:
BEGIN OF fs_adrc,
date_to TYPE adrc-date_to,
addrnumber TYPE adrc-addrnumber,
date_from TYPE adrc-date_from,
name1 TYPE adrc-name1,
END OF fs_adrc.
In INITIALIZATION,
SELECT date_to
addrnumber
date_from
name1
UP TO 50 ROWS
FROM adrc
INTO TABLE
t_adrc.
I have declared three main windows.
Under my First Main window,
I have created a LOOP node and Text node also.
Now, In the Text node -
> General Attributes.
I have dragged and dropped my fields from the field list.
Now, the main problem is that the Address records are printed but not in form of LABELS but are printed as a normal list.
I am also not able to link those 3 main windows together in order to continue the addresses on those windows.
I mean to say, that whenever the first address is printed on the First main window, then the next address should be printed on the Second and the similar for the Third one.
This feature is easily possible in SAP scripts, but I am not able to get the way to do it.
Hope my situation is clear, Or if any more steps are required do let me know.
I respect your inputs.
Good Luck & Regards.
Harsh DaveHi.
It has been long since, I did not get any usefull answers.
But, My doubt has been cleared by some usefull tutorials.
If any one has some knowledge to share, I will be glad.
I respect your inputs and suggestions.
Good Luck & Regards.
Harsh Dave -
Using G_SET_GET_ALL_VALUES Method
Hi,
I need to use the following method. G_SET_GET_ALL_VALUES. But I'm not sure of the data type that it returns.
CALL FUNCTION 'G_SET_GET_ALL_VALUES'
EXPORTING
CLIENT = ' '
FORMULA_RETRIEVAL = ' '
LEVEL = 0
setnr = wa_itab_progrp-setname
VARIABLES_REPLACEMENT = ' '
TABLE = ' '
CLASS = ' '
NO_DESCRIPTIONS = 'X'
NO_RW_INFO = 'X'
DATE_FROM =
DATE_TO =
FIELDNAME = ' '
tables
set_values = ????????
EXCEPTIONS
SET_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Can anyone please let me know what I should do at the SET_VALUES section.
Thanks
LilanHi,
See the FM Documentation,
This function module determines all the values of a set or its subordinate sets. The required call parameter is the set ID (SETNR). The other parameters are optional:
FORMULA_RETRIEVAL: 'X' => The formulas in the set are also returned (default ' ' requires fewer database accesses)
LEVEL: The default value is 0 and means "expand all levels". Values other than 0 determine the level to which they are to be expanded
VARIABLES_REPLACEMENT: 'X' => The value variables in the set hierarchy are replaced by their default values (this means additional database accesses for each variable)
NO_DESCRIPTIONS: 'X' => The short descriptions of the sets and set lines are not read from the database. For performance reasons you should only set this parameter to ' ' if you need the texts
The values determined are returned to the internal table SET_VALUES.
Thanks. -
Hey,
in an alv the user klicks a defined button and thoe transaction 'slg1' is opened. Unfortunately, the first screen appears although there is the command skip first screen.
Code:
METHOD on_user_command.
CASE e_salv_function.
WHEN 'SHOWLOG'.
SET PARAMETER ID 'BALOBJ' FIELD 'ZDBS_AZUBI_ELEMENT'.
CALL TRANSACTION 'SLG1' AND SKIP FIRST SCREEN.
ENDCASE.
Could you please help me?Use function module " APPL_LOG_DISPLAY" for this. set parameter "SUPPRESS_SELECTION_DIALOG" = 'X'.
CALL FUNCTION 'APPL_LOG_DISPLAY'
EXPORTING
OBJECT = zdbs_azubi_element
DATE_FROM = date_from
DATE_TO = date_to
SUPPRESS_SELECTION_DIALOG = 'X'
EXCEPTIONS
NO_AUTHORITY = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards -
How to compare 2 dates in SQL Server 2000 DB using Java?
How do you compare 2 dates in SQL Server 2000 DB using Java?
Let's say we have two fields: Date Reported and Target Finish Date.
Date Reported is 09-10-2004 09:55:55: PM
Target Finish Date is 09-12-2004 11:59:59: PM
What i want to happen is i want to convert both dates to days and get the difference of the two.
can SQL Server 2000 DB do this?it doesnt wrk.
ok here's what i did:
iv tested a simple code for this case.
I created a table name tblDate which has 3 columns namely date_ID, date_From (datatype datetime), date_To (datatype datetime).
I inserted 1 row: date_ID has the value 1, date_From has the value 10/22/2004, and date_To has the value 10/24/2004.
i run the java code below:
int days = 0;
String query = "SELECT date_From, date_To cast(date_From-date_To AS int) AS Diff FROM tblZoo WHERE date_ID = '1'";
try
DBConnect db = new DBConnect();
db.openCon();
ResultSet rs = db.execute(query);
while(rs.next())
days = rs.getInt("Diff");
db.closeCon();
catch (Exception ex)
System.out.println("Error on Execution: " + ex);
return days;___________
an error occurred: Error on Execution: java.lang.nullpointerexception -
PO email output type program causes unable to print preview
Hi Guys,
i am customising a program for print preview email for PO output type, but the preview does not come out , here is the code:
form entry_neu using ent_retco ent_screen.
data: dtext like tline.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
exporting
ix_nast = nast
ix_screen = ent_screen
importing
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
changing
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
concatenate l_nast-kschl 'for ' l_doc-xekko-ebeln into
l_nast-TDCOVTITLE separated by space.
ekko = l_doc-xekko.
perform set_textsymbol using '&EKKO-WAERS&' EKKO-WAERS.
select adrc~name1 into rm06b-ltex1
from t001
join adrc
on adrcaddrnumber eq t001adrnr and
adrc~date_from le sy-datum and
adrc~nation eq space
where t001~bukrs = ekko-bukrs.
endselect.
select single regno into t9s01-regno
from t9s01
where bukrs = ekko-bukrs.
if sy-subrc eq 0.
T9S01-BUKRS = EKKO-BUKRS.
endif.
perform set_textsymbol using '&RM06B-LTEX1&' RM06B-LTEX1.
perform set_textsymbol using '&T9S01-REGNO&' t9s01-regno.
perform set_textsymbol using '&T9S01-BUKRS&' T9S01-BUKRS.
lfa1-lifnr = ekko-lifnr.
select single adrc~str_suppl3 into lfa1-name4
from lfa1
join adrc
on adrcaddrnumber = lfa1adrnr
where lfa1~lifnr = ekko-lifnr.
perform set_textsymbol using '&LFA1-LIFNR&' LFA1-LIFNR.
perform set_textsymbol using '&LFA1-NAME4&' LFA1-NAME4.
perform set_textsymbol using '&EKKO-WAERS&' EKKO-WAERS.
perform read_text using 'F15' DTEXT-TDLINE.
if dtext-tdline is initial.
if ekko-ekgrp eq 'CP1' or ekko-ekgrp eq 'C03' or
ekko-ekgrp eq 'P01' or ekko-ekgrp eq 'P02' or
ekko-ekgrp eq 'P03' or ekko-ekgrp eq 'P04' or
ekko-ekgrp eq 'P08'.
move 'Requisitioner.' to DTEXT-TDLINE.
elseif ekko-ekgrp eq 'CP2' or ekko-ekgrp eq 'C01' or"B0691
ekko-ekgrp eq 'C04' or ekko-ekgrp eq 'P05' or
ekko-ekgrp eq 'P06' or ekko-ekgrp eq 'P07' or
ekko-ekgrp eq 'P09' or
ekko-ekgrp eq 'C05'. "B0691
move 'Accounts Payable.' to DTEXT-TDLINE.
else. "B0691
move 'Accounts Payable.' to DTEXT-TDLINE. "B0691
endif.
endif.
t9s02-text4 = DTEXT-TDLINE(17).
perform set_textsymbol using '&T9S02-TEXT4&' T9S02-TEXT4.
CLEAR GV_NO_CONTRACT.
perform read_text using 'F13' T9S02-TEXT7.
IF T9S02-TEXT7 IS INITIAL. "Buyer did not type anything
MOVE 'stipulated at the end of this PO.' TO T9S02-TEXT7.
MOVE 'X' TO GV_NO_CONTRACT.
ENDIF.
perform set_textsymbol using '&T9S02-TEXT7&' T9S02-TEXT7 .
SELECT SINGLE VERKF into LFM1-VERKF
FROM LFM1
WHERE LIFNR = EKKO-LIFNR
AND EKORG = EKKO-EKORG.
perform set_textsymbol using '&LFM1-VERKF&' LFM1-VERKF .
loop at l_doc-XEKPO into ekpo where zwert = 0.
if ekpo-peinh ne 0.
ekpo-zwert = ( EKPO-MENGE * EKPO-NETPR ) /
( EKPO-PEINH * 1000 ).
else.
ekpo-zwert = ( EKPO-MENGE * EKPO-NETPR ) / 1000 .
endif.
modify l_doc-XEKPO from ekpo.
endloop.
clear: gv_print, gv_terms, gv_tcode.
gv_print = tnapr-FUNCNAME.
gv_terms = tnapr-sform.
gv_tcode = tnapr-FONAM5.
call function 'Z_ME_PRINT_PO'
exporting
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
gv_no_contract = gv_no_contract
gv_print = gv_print
gv_terms = gv_terms
gv_tcode = gv_tcode
end of additions
importing
ex_retco = ent_retco.
endform.
did i miss anything in the coding? pls advicehi,
There are two options.
1. Change the output medium of the output type to Print putput 1(No 1).
2. For the sender customer go to transaction XD02 and give your mail ID instead of the customers and check. You will get the output in PDF format.
Thanks,
Kasiraman R -
Converting to a new version of a complextype
Hello
I have two versions of the contentOrganizationType complex type which are declared in separate locations.
And I have one record in a xmltype-table which includes an instance of the first version (v1.0) of the contentOrganizationType which is defined in the "oebs_content_organization_element.xsd".
And I try to convert this instance to the second version (v2.0) by the next transformation:
DECLARE buf xmltype;
BEGIN
select
xmltype(
replace(
replace(
REPLACE(
(xmltransform(
extract(OBJECT_VALUE, '/oebs:root/c:content[@xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization [b]oebs_content_organization_element.xsd"]', 'xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:c="http://www.rosbank.ru/oebs/content/organization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'),
XMLType(bfilename('XMLDIRECTORY', 'organization_to_v2.0.xsl'), nls_charset_id('AL32UTF8'))
).getStringVal()),
chr(38) || 'lt;',
'<'
chr(38) || 'gt;',
'>'),
chr(38) || 'quot;',
into buf
from oebs
UPDATE oebs
SET OBJECT_VALUE =
deleteXML(OBJECT_VALUE,'/oebs:root/c:content[@xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd"]', 'xmlns:oebs="http://www.rosbank.ru/oebs" xmlns:c="http://www.rosbank.ru/oebs/content/organization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
UPDATE oebs
SET OBJECT_VALUE =
appendChildXML(OBJECT_VALUE,'/oebs:root',buf,'xmlns:oebs="http://www.rosbank.ru/oebs"');
end;
In other words I try to remove an instance of the first version, convert it to the second version by the xmltransform operation and insert it into the table.
Here is the fragment of a xsl from the "'organization_to_v2.0.xsl":
<xsl:text disable-output-escaping="yes"><![CDATA[<organization:]]></xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes"><![CDATA[ xmlns:organization="]]></xsl:text>
<xsl:value-of select="namespace-uri()"/>
<xsl:text disable-output-escaping="yes"><![CDATA[" xsi:schemaLocation="]]></xsl:text>
<xsl:value-of select="namespace-uri()"/>
<xsl:text disable-output-escaping="yes"><![CDATA[ oebs_content_organization_element_V2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[</organization:]]></xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
And here is the result of xsl (xmltransform):
<organization:content xmlns:organization="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element_V2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><organization><org_structure_version_id>1</org_structure_version_id><organization_id>2283</organization_id><organization_id_hrom></organization_id_hrom><organization_id_parent_hrom>3108894</organization_id_parent_hrom><event_name>CREATE</event_name><org_name>????????? ?????? ??? ??? ???????</org_name><date_from>01.12.2004</date_from><date_to></date_to><organization_id_parent>2209</organization_id_parent><organization_code>01.00.066.0.000.000.00.000.00</organization_code><organization_type>??????</organization_type><max_last_update_date>29.10.2007 12:36:35</max_last_update_date><p_union_par>2283|ORGANIZATION|CREATE|01.12.2004|29.10.2007 12:36:35|13.02.2007 15:56:28|27.11.2006 11:21:29|14.06.2006 00:00:00|01.12.2004|</p_union_par><element1>0</element1></organization></organization:content>
And I get the next error:
ORA-30937: No schema definition for 'element1' (namespace '##local') in parent '/root/content/organization'
ORA-06512: on line 30
The "element1" is a new element which was added in the second version (v2.0) of the contentOrganizationType. The version v2.0 is located in the "oebs_content_organization_element_V2.0.xsd".
As you can see the result of a xmltransform is the element which has the "oebs_content_organization_element_V2.0.xsd" schema location too.
I think that unfortunately in this case a checking against the first version is happening but the first version doesn't have a definition of the "element1".
Can someone give me any suggestions about how to change this testcase to make it possible to insert a new part inside a whole record instead a old part in case when both parts have the same type but different versions?
Regards
DmitryHello, Marko.
Thank you for your answer.
The copyevolve is the one way which can be used in my case but I need to process particular range of records which include an instance of a special complextype.
I don't need to convert a whole table because only about one percent of records must be processed. I think converting of a whole table will reduce a processing speed.
Is it possible to use the copyevolve in this case?
How to use the copyevolve to convert a data for a sub-tree of a xml-schema if I need to transform it by a xsl?
Regards
Dmitry -
CRM ORDER CHANGE / CRM_ORDER_MAINTAIN
Hi Max.
Firt of all, Let me thank you for taking the time and replying to my question. Thank you again.
Now, Inyour reply, you said that it is a little tricky on how we fill in the BAPI structures, can you please explain how. I did try your advise with the sample code, but the order is still not changing. I am losing my mind here. I seriously need help. Here is my scenerio:
I extended the table CRMD_PARTNER with two date fields (Date to and Date From). I could not add these two fields to the order->partner tab table control as columns, so I creared a custom screen that mimics the data from Partner tab with my additional date fields as 2 columns. These dates need to be maintained.
So I tried to work with your sample code, populated my it_partner table with the record that I need to change, populated the LT_INPUT_FIELDS table with Object=partner, ref_kind=A, REF_GUID=MY_ORDER_GUID, LOGICAL_KEY=MY_LOGICAL_KEY and the field names are: DATE_FROM,DATE_TO,DISPLAY_TYPE, KIND_OF_ENTRY,NO_TYPE, PARTNER_NO. All fields are marked 'X' for changeable parameter. When I run my code, I get a subrc=0. when i look at the order in the system, i dont see my dates changed.
I am attaching my code below. Can you please help me out. What am i doing wrong. What am I missing. I even tried to call the CRM_PARTNER_BADI from my custom screen but that did not work either. Do I need to call the FM:order_maintain along with the PARTNER_BADI? HELP PLEASE. THANKS.
DATA:
IT_PARTNER TYPE CRMT_PARTNER_COMT,
IS_PARTNER TYPE CRMT_PARTNER_COM,
CT_ORDERADM_H TYPE CRMT_ORDERADM_H_COMT,
CS_ORDERADM_H TYPE CRMT_ORDERADM_H_COM,
CT_INPUT_FIELDS TYPE CRMT_INPUT_FIELD_TAB,
CS_INPUT_FIELDS TYPE CRMT_INPUT_FIELD,
CT_FIELD_NAMES TYPE CRMT_INPUT_FIELD_NAMES_TAB,
CS_FIELD_NAMES TYPE CRMT_INPUT_FIELD_NAMES,
CS_INPUTFIELDS TYPE CRMT_INPUT_FIELD_NAMES.
CS_ORDERADM_H-HANDLE = '0000000000'.
CS_ORDERADM_H-GUID = '43FDCE7DBD600058020000000A4DA19F'.
CS_ORDERADM_H-OBJECT_ID = '0005000243'.
CS_ORDERADM_H-PROCESS_TYPE = 'ZBND'.
CS_ORDERADM_H-MODE = 'B'. "A=CREATE, B=CHANGE, C=DISPLAY
APPEND CS_ORDERADM_H TO CT_ORDERADM_H.
CS_INPUT_FIELDS-REF_HANDLE = '0000000000'.
CS_INPUT_FIELDS-REF_GUID = '43FDCE7DBD600058020000000A4DA19F'.
CS_INPUT_FIELDS-REF_KIND = 'A'.
CS_INPUT_FIELDS-OBJECTNAME = 'PARTNER'.
CS_INPUT_FIELDS-logical_key = '0000000000011311 BPBP'.
CS_INPUTFIELDS-FIELDNAME = 'DATE_FROM'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'DATE_TO'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'DISPLAY_TYPE'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'KIND_OF_ENTRY'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'NO_TYPE'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'PARTNER_NO'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
APPEND CS_INPUT_FIELDS TO CT_INPUT_FIELDS.
IS_PARTNER-REF_GUID = '43FDCE7DBD600058020000000A4DA19F'. "ORDER GUID
IS_PARTNER-REF_KIND = 'A'.
IS_PARTNER-REF_PARTNER_FCT = '00000001'.
IS_PARTNER-REF_PARTNER_NO = '1311'.
IS_PARTNER-REF_NO_TYPE = 'BP'.
IS_PARTNER-REF_DISPLAY_TYPE = 'BP'.
IS_PARTNER-PARTNER_GUID = '43FDCEEEBD600058020000000A4DA19F'.
IS_PARTNER-KIND_OF_ENTRY = 'C'.
IS_PARTNER-PARTNER_FCT = '00000001'.
IS_PARTNER-PARTNER_NO = '1311'.
IS_PARTNER-DATE_FROM = '20060627'.
IS_PARTNER-DATE_TO = '20060627'.
APPEND IS_PARTNER TO IT_PARTNER.
To set maintain function to act like BAPI
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
EXPORTING
IV_INITIALIZE_WHOLE_BUFFER = 'X'.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PARTNER = IT_PARTNER
CHANGING
CT_ORDERADM_H = CT_ORDERADM_H
CT_INPUT_FIELDS = CT_INPUT_FIELDS.
IF SY-SUBRC <> 0.
ENDIF.
*RESET
CALL FUNCTION 'DIALOG_SET_WITH_DIALOG'.
if sy-subrc ne 0. endif.
clear s_new_order.
read table t_new_orders
into s_new_order
INDEX 1.
if sy-subrc = 0.
l_object_to_save = CS_ORDERADM_H-GUID.
INSERT l_object_to_save INTO TABLE t_object_to_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = t_object_to_save
IMPORTING
et_saved_objects = t_saved_objects
et_exception = t_exceptions
et_objects_not_saved = t_objects_not_saved
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
COMMIT WORK.Hi Cool,
Please compare the following code with your code :
REPORT yam_test_crmordermaintain .
DATA : lit_partner TYPE crmt_partner_comt,
wa_partner LIKE LINE OF lit_partner,
ls_input_field TYPE crmt_input_field,
ls_input_field_names TYPE crmt_input_field_names,
lt_input_field_names TYPE crmt_input_field_names_tab,
lt_input_fields TYPE crmt_input_field_tab.
DATA : lit_header_guid TYPE crmt_object_guid_tab,
wa_header_guid LIKE LINE OF lit_header_guid.
* Populate the Input Field Structure
CLEAR ls_input_field_names.
ls_input_field_names-fieldname = 'PARTNER_FCT'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'PARTNER_NO'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'NO_TYPE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field-ref_guid = '00000000000000000000000000000000'.
ls_input_field-ref_kind = 'A'.
ls_input_field-objectname = 'PARTNER'.
ls_input_field-field_names = lt_input_field_names.
INSERT ls_input_field INTO TABLE lt_input_fields.
* Bill To Party
MOVE: '00000000000000000000000000000000' TO wa_partner-ref_guid,
'A' TO wa_partner-ref_kind,
'0001' TO wa_partner-ref_partner_handle,
'00000003' TO wa_partner-partner_fct,
'10000073' TO wa_partner-partner_no,
'BP' TO wa_partner-no_type,
'BP' TO wa_partner-display_type,
'X' TO wa_partner-mainpartner.
APPEND wa_partner TO lit_partner.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_partner = lit_partner
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Call CRM_ORDER_SAVE after the above statements and nothing else required.
<b>Note: Instead of '00000000000000000000000000000000' give your HEADER GUID.</b>
<b>See if it works, reward points if it helps.</b> -
Hi experts,
I want to set default value for dates..
My screen has : date_from & date_to.
date_to : will be current date(today's date) if Eg: 27.08.2007 (here i used NOW())
then date_from must be 01.06.2007 (3 months logic)
similarly : if date_to is 01.01.2007
then date_from must be 01.11.2006
kindly help...
Thanks a lot!!!
Regards,
BijalHi Bijal
(DGET(NOW(),'D'))-1) returns number which is 0 incase of 01.08.2007, so DADD(NOW(),-0,'D') is again ideally same day 01.08.2007 .
So, DADD(DADD(NOW(),-0,'D'),-2,'M') should give you 01.06.2007.
<b> IT WORKS!!! -
I have tested it now.</b>
Please check and revert.
The IF formula which sent actually returns String, so use DVAL(IF(DGET(NOW(),'D')!=1,DADD(DADD(NOW(),-((DGET(NOW(),'D'))-1),'D'),-2,'M'),DADD(NOW(),-2,'M')))
Message was edited by:
Navneet Giria -
Calender using Date From and Date To
Hi,
I'm trying to build a calender based on a table that has a user_name, date_from, date_to and comments.
Basically I want the calender to show all the dates betwwen the date from and date to. Is there any way of getting the calender to use those dates and all the days in between or will I have a to build a view that returns one row for each day between the start and end
Whats the best way of doing this and does any one have an example
Thanks in advanceAndy,
See my blog post here:
http://deneskubicek.blogspot.com/2007/05/create-pseudo-tables.html
and the corresponding example:
http://htmldb.oracle.com/pls/otn/f?p=31517:83
Denes Kubicek
http://deneskubicek.blogspot.com/
http://htmldb.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Executing Stored procedure from host file
Hi all,
I am trying to execute a procedure from a host file.I don't know where I am doing wrong but the procedure is not executing.
#!/bin/bash
echo "*********************** Initializing Global Variables ***********************"
export CONNECT_STRING=$1
export START_TIME=`date +%m/%d/%Y:%H%M`
#export DATE_FROM=`date +%m/%d/%Y:%H%M`
#export DATE_TO=`date +%m/%d/%Y:%H%M`
DATE_FROM=$5
DATE_TO=$6
sqlplus -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S -S ${CONNECT_STRING} <<EOF
WHENEVER SQLERROR EXIT FAILURE
set echo off
execute xxjy_extract_ar_transactions.main_preinterface('$DATE_FROM','$DATE_TO');
EOF
echo "From Date is $DATE_FROM"
echo "To Date is $DATE_TO" In my log i can see the From Date is 1-Jan-2013 and To date is 28-Feb-2013 which are my input parameters to concurrent program.But I don't understand why my procedure is not getting called.
Please advice.
Thanks,
SandeepPlease post the details of the application release, database version and OS.
Is the issue with this specific host concurrent program?
Did you follow the steps in these docs?
How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1]
How Do You Run A Unix Host Script From Concurrent Managers On MS Windows Platform? [ID 412392.1]
How To Setup A Custom Concurrent Host Program [ID 147455.1]What is the reason of using more than one "-S" in the sqlplus command?
Please enable trace and generate the TKPROF file to find out what is happening when you kick off this concurrent program?
FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]
How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
Thanks,
Hussein -
Table not declared error even though I'm able to view it in database
Hi,
I'm trying to compile a form with the following code in a when button pressed trigger.I get the error that Trust_tab should be declared even though I am able to view the contents in sql plus. Why is it?
REGISTER_BLK.TRUST_CODE:=:GLOBAL.TRUSTCODE;
declare
m number;
begin
if CHECKBOX_CHECKED('REGISTER_BLK.CHK_BETWEEN_DATES') =true and (:REGISTER_BLK.date_from is null or :REGISTER_BLK.date_to is null )THEN
if :REGISTER_BLK.date_from is null then
m:=show_alert('alert61');
-- message('Please Enter Date');
previous_item;
go_item('register_blk.date_from');
raise form_trigger_failure;
elsif :REGISTER_BLK.date_to is null then
-- message('Please Enter Date');
m:=show_alert('alert61');
previous_item;
go_item('register_blk.date_to');
raise form_trigger_failure;
end if;
else
DECLARE
n number;
PL_ID PARAMLIST;
CONDITION VARCHAR2(500);
CHANGED_MODE_TYPE VARCHAR2(20);
MODECODE NUMBER;
TRUSTNAME VARCHAR2(60);
TNAME VARCHAR2(60);
TRUST_CODE VARCHAR2(1);
MODE_TYPE VARCHAR2(15);
DATE_FROM DATE;
DATE_TO DATE;
CONDITION1 VARCHAR2(200);
MAXDATE DATE;
BEGIN
IF NOT Id_Null(get_parameter_list('ABC')) THEN
Destroy_Parameter_List('ABC');
END IF;
PL_ID:=create_parameter_list('ABC');
IF
CHECKBOX_CHECKED('REGISTER_BLK.CHK_BETWEEN_DATES')= TRUE
--THEN
and :REGISTER_BLK.date_to is not null
and :REGISTER_BLK.date_from is not null then
DATE_FROM:=:REGISTER_BLK.DATE_FROM;
DATE_TO :=:REGISTER_BLK.DATE_TO;
SELECT TRUST_NAME INTO TRUSTNAME FROM TRUST_TAB
WHERE TRUST_CODE=:REGISTER_BLK.TRUST_CODE;
:REGISTER_BLK.TNAME:=TRUSTNAME;
CONDITION:= ' HAVING DV.TRUST_CODE = '|| :REGISTER_BLK.TRUST_CODE ||
' AND MAX(MAXDATE) >= ' ||''''||TO_CHAR(:REGISTER_BLK.DATE_FROM,'DD-MON-YY')||'''' ||
' AND MAX(MAXDATE) <= ' ||''''||TO_CHAR(:REGISTER_BLK.DATE_TO,'DD-MON-YY')||'''';
-- MESSAGE(CONDITION);
Add_parameter('ABC','paramform',TEXT_parameter,'no');
Add_parameter('ABC','P_CODE',TEXT_PARAMETER,:REGISTER_BLK.TRUST_CODE);
Add_parameter('ABC','P_datefrom',TEXT_PARAMETER,:REGISTER_BLK.DATE_FROM);
Add_parameter('ABC','P_dateto',TEXT_PARAMETER,DATE_TO);
--Add_parameter('ABC','WHERE_CLAUSE',TEXT_PARAMETER,CONDITION);
--Add_parameter('ABC','HAVING_CLAUSE',TEXT_PARAMETER,CONDITION1);
Run_Product(REPORTS,'new_rec2.rdf',ASYNCHRONOUS,RUNTIME,
FILESYSTEM,PL_ID,NULL);
ELSIF
CHECKBOX_CHECKED('REGISTER_BLK.CHK_BETWEEN_DATES') = FALSE
--THEN
or :REGISTER_BLK.date_to is null
or :REGISTER_BLK.date_from is null then
n:=show_alert('alert62');
previous_item;
go_item('REGISTER_BLK.CHK_BETWEEN_DATES');
--raise form_trigger_failure;
-- MESSAGE('Select atleast One Option for Generation of Report');
-- MESSAGE('Select atleast One Option for Generation of Report');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
end if;Guess you are connected with wrong schema..
have you test with another test button ,simply just count the record into local
vraible with sql in another test button??
DECLARE
cnt NUMBER;
BEGIN
SELECT COUTN(*) INTO cnt
FROM trust_tab;
message(cnt);
END;If the same prob persist check yours connectivity from where you are connected.
Khurram -
Cost center data fetch from COSS/COSP tables.
Hi Experts,
I need to fetch data from COSS/COSP tables for particular Cost centers fetched in CSKS select.
As there is no Costcenter field I cannot access the database tables directly.
Fetching entire dat and then deleting is causing performance issue with the report.
I need to reduse the time taken by COSS/COSP table select , as I have Cost center field on the selection screen.
Is there any other method or FM that I can use?
Thanks in advance!!!Hi
This is my code to get the data from a certain cost element group:
}call function 'G_SET_GET_ID_FROM_NAME'
exporting
shortname = p_kagru
tabname = 'CCSS'
fieldname = 'KSTAR'
kokrs = p_kokrs
ktopl = 'ENPC'
setclass = '0102'
check_set_empty = 'X'
importing
new_setid = setid
* SET_INFO =
exceptions
no_set_found = 1
no_set_picked_from_popup = 2
wrong_class = 3
wrong_subclass = 4
table_field_not_found = 5
fields_dont_match = 6
set_is_empty = 7
formula_in_set = 8
set_is_dynamic = 9
others = 10
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'G_SET_GET_ALL_VALUES'
exporting
* CLIENT = ' '
* FORMULA_RETRIEVAL = ' '
* LEVEL = 0
setnr = setid
* VARIABLES_REPLACEMENT = ' '
* TABLE = ' '
* CLASS = ' '
* NO_DESCRIPTIONS = 'X'
* NO_RW_INFO = 'X'
* DATE_FROM =
* DATE_TO =
* FIELDNAME = ' '
tables
set_values = t_set_values
exceptions
set_not_found = 1
others = 2
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
loop at t_set_values.
count = count + 1.
r_kstar(3) = 'IEQ'.
r_kstar-low = t_set_values-from.
append r_kstar.
if count = 500.
perform read_coep.
else.
at last.
perform read_coep.
endat.
endif.
endloop
U can use somthing like that to get data from cost center
Max
Maybe you are looking for
-
Printing: print prepared binary stream with SAPWIN
Hi . We have a lot of different documents(MS Word, MS Excel, TIFF, PDF etc.) stored in DMS. Now we need to print them from SAP applications using SAP printers. For that we have an external conversion server, that could convert files to any print stre
-
Hi all, Is there any user guide to transfer data form SBO to R3? I have found out in Marketplace unsuccesfully. Regards, Javier Zapata
-
Problems importing Thunderbird Mailbox into Mail
I am having problems importing my Thunderbird mailboxes into Mail. I won't go into the many problems and issues I had to solve (but there were many) but would ask if anyone can help me solve the one I still have. In Mail I used the Import Mailboxes c
-
Restriction to access schema objects
Hi, Is it possible to give restriction that connect with the user in oracle but can not view any object. And if we will run the query select count(*) from user_objects; will give "0" but if we write a query for user created table, we can access the t
-
I am trying to create a large catalog. I have 3 very different product types that require different info, and therefore I think, completely different templates. I was thinking that I will need to create three separate data merge templates/ merges,