Displaying fields from a Z Table on CRM UI
Hello Experts
I am trying to display fields from a custom table onto a CRM UI form view.
1. I created a custom GENIL root object & Search object ie. ZCUSTOMER. & ZCUSTSEARCH
2. Tested this in the GENIL BROWSER to ensure that I could enter update values to the table and retrieve it via the search object.
3. Created a custom component ZCUSTOMER
4. Created a view with this component ZCUSTOMER using the wizard -
Model Name - CUSTINFO
BOL Entity - ZCUSTOMER
No links to the custom controller or higher level objects.(as I do not want to tie this to any standard components)
Type of view - Form view
7. Created a Context node for the component controller with the same info as I did for the view.
8. Performed the binding of the view context node with the component controller context node.
9. Configured 1 field CUST_NAME to be displayed on the view.
10. Configured the run time repository to display the view.
Now the issue is..
When the view gets displayed, the field is displayed with the error "CUST_NAME not bound"
What am i missing?
Thanks
RLX
Hi Swati,
Thanks for the feedback. I re-viewed the WD_CREATE_CONTEXT method of the view controller implementation class and I see the following code in there already-
method WD_CREATE_CONTEXT.
create the context
context = cl_bsp_wd_context=>get_instance(
iv_controller = me
iv_type = 'ZL_ZCUSTOMER_BSPWDCOMPONEN_CTXT' ).
typed_context ?= context.
endmethod.
Does that look right or do I need to modify it?
Thanks once again for the help.
RLX
Similar Messages
-
How to join fields from different internal tables and display into one int
hai i have one doubt...
how to join fields from different internal tables and display into one internal table..
if anybody know the ans for this qus tell me......hii
you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
SELECT bwkey " Valuation Area
bukrs " Company Code
FROM t001k
INTO TABLE i_t001k
WHERE bukrs IN s_bukrs.
IF sy-subrc EQ 0.
SELECT bwkey " Valuation Area
werks " Plant
FROM t001w
INTO TABLE i_t001w
FOR ALL ENTRIES IN i_t001k
WHERE bwkey = i_t001k-bwkey
AND werks IN s_werks.
IF sy-subrc EQ 0.
LOOP AT i_output INTO wa_output.
READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
wa_output-bukrs = wa_t001k-bukrs.
MODIFY i_output FROM wa_output.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
ENDIF. " IF sy-subrc EQ 0
regards
twinkal -
Extracting Values of a Field from a Database Table in SAP ECC System
Hi,
I downloaded Extracting Values of a Field from a Database Table in SAP ECC System Using MII 12.0
senario from sdn. I'm trying to do that senario in MII 12.05. But I have problem with section 6 in page 7 (you can supply senario from sdn)
"6- Under the loop of Repeater, use action u2018Rowu2019 to append just the string part of the WA which will display only values for field u2018Batchu2019"
I did not find WA elemen in Output element of Repeater_0
How can I create WA element?
Thanks.Cemil,
Set up a SAP JCo Interface action block. Use the RFC name RFC_READ_TABLE.
In the link editor map the table to "MARA", set RowCount to something small (20 is good sample size) and create an xml transaction property named FIELDS and copy the following into it:
<?xml version="1.0" encoding="UTF-8"?><FIELDS>
<item>
<FIELDNAME>MATNR</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>MTART</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>BSTME</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>XCHPF</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>DATAB</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
</FIELDS>
Then link the Transaction.FIELDS to SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS}. You may run into problems with two other fields and optionally they can be removed (set link type to remove xml). I usually remove them initially for testing. The two fields are:
SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/NO_DATA}
SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/DELIMITER} (or you can set this to something like a semicolon,";" or tilda,"~". I find it easier to caclulate position by length, but that is my own idiosyncrasy.)
Once you get this one working, we can explore how to do filtering on the dataset. Your output should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<RFC_READ_TABLE>
<INPUT>
<DELIMITER />
<NO_DATA />
<QUERY_TABLE>MARA</QUERY_TABLE>
<ROWCOUNT>20</ROWCOUNT>
<ROWSKIPS>0</ROWSKIPS>
</INPUT>
<TABLES>
<DATA>
<item>
<WA>000000000000000023ROH 00000000</WA>
</item>
<item>
<WA>000000000000000038HALB 00000000</WA>
</item>
<item>
<WA>000000000000000043HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000058HIBE 00000000</WA>
</item>
<item>
<WA>000000000000000059HIBE 00000000</WA>
</item>
<item>
<WA>000000000000000068FHMI 00000000</WA>
</item>
<item>
<WA>000000000000000078DIEN 00000000</WA>
</item>
<item>
<WA>000000000000000088FERT 00000000</WA>
</item>
<item>
<WA>000000000000000089FERT 00000000</WA>
</item>
<item>
<WA>000000000000000098HALB 00000000</WA>
</item>
<item>
<WA>000000000000000170NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000178NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000188NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000288HALB 00000000</WA>
</item>
<item>
<WA>000000000000000358HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000359HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000521HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000578FERT 00000000</WA>
</item>
<item>
<WA>000000000000000597HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000598VERP 00000000</WA>
</item>
</DATA>
<FIELDS>
<item>
<FIELDNAME>MATNR</FIELDNAME>
<OFFSET>000000</OFFSET>
<LENGTH>000018</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Material Number</FIELDTEXT>
</item>
<item>
<FIELDNAME>MTART</FIELDNAME>
<OFFSET>000018</OFFSET>
<LENGTH>000004</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Material Type</FIELDTEXT>
</item>
<item>
<FIELDNAME>BSTME</FIELDNAME>
<OFFSET>000022</OFFSET>
<LENGTH>000003</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Purchase Order Unit of Measure</FIELDTEXT>
</item>
<item>
<FIELDNAME>XCHPF</FIELDNAME>
<OFFSET>000025</OFFSET>
<LENGTH>000001</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Batch management requirement indicator</FIELDTEXT>
</item>
<item>
<FIELDNAME>DATAB</FIELDNAME>
<OFFSET>000026</OFFSET>
<LENGTH>000008</LENGTH>
<TYPE>D</TYPE>
<FIELDTEXT>Valid-From Date</FIELDTEXT>
</item>
</FIELDS>
<OPTIONS />
</TABLES>
</RFC_READ_TABLE>
Add a repeater sourced on:
SAP_JCo_Interface_0.Response{/RFC_READ_TABLE/TABLES/DATA/item}
Link your repeater output to a tracer with this:
Repeater_0.Output{/item/WA}
What you will see in each tracer message is a single line of data with all the fields contents concatenated together. You can look up what each field in the string represents by the length of the field as returned in the Response segment of the RFC_READ_TABLE rfc. Then you can parse out the data you are interested in.
Give this a try and let me know how you succeeded.
By the way, I could not find the scenario you referred to. Can you post a link?
Regards,
Mike
Edited by: Michael Appleby on Jan 12, 2009 5:16 PM -
Extract a value of a fields from an internal table
hello everyone,
i need to extract a value of a fields from an internal table, the fields is in a postion "sy-tabix" that i know, so i need to pick this value without using a loop
thank you.Like this?
DATA: FIELD1 TYPE C,
FIELD2 TYPE C.
READ TABLE T_TAB INDEX 3.
FIELD1 = T_TAB-FIELD1.
FIELD2 = T_TAB-FIELD2.
Greetings,
Blag. -
How to compare two fields from the same table in the select statement
Hi, friends
I try to compare tow fields from the same table, but no result,
For example, this
data: cptotchek tyep i.
select count(*) into cptotchek
from aufk where erdat = aufk-idat2 .
The result is cptotchek = 0, but there are the records in aufk , where, aufk-erdat = aufk-idat2.
Please, help me, i don't use the loop statement for optimize my program.
RegardsHi ,
it will not return any value when you are using column of same table
such as Date Field , Because while Using Aggregate Function it will not check with self column
. For that you have to take data in one internal table and then you can work on it .
And if you are worried about Performance it will not affect , untill you are selecting only required data .
you can try this way .
data: cptotchek type i.
types : begin of w_aufk.
include structure aufk .
types : end of w_aufk .
data : it_aufk type standard table of w_aufk with header line .
select * into corresponding fields of table it_aufk
from aufk .
loop at it_aufk .
if it_aufk-erdat = it_aufk-idat2 .
write : / it_aufk-erdat , it_aufk-idat2 .
else .
delete it_aufk .
endif .
endloop.
Regards
Deepak. -
Select Distinct Fields from non related table
Hi Experts,
I have to fetch Distinct Fields from table zdcxy along with the fields from the table zvend but there is no primary key forigen key relationship also if I wanted use join condition. I need to move fields from both the table into output file and 1 part I implemented but I am unable to do second part plz any body can help me its argent. below I pasted part of code along with two requirements.
1.Select all data (Location - LIFNR, Descr u2013 ZPLTNAMEC, CJI_CUSTOMER u2013 CJI customer flag) from ZVEND table.
2.Select all distinct DCs and BUs from zdcxy table.
SELECT * FROM ZVENDPLT INTO CORRESPONDING FIELDS OF TABLE IT_VENDPLT.
*select distinct zdc from zdcxy into corresponding fields of table it_map.
*select distinct zbu from zdcxy into corresponding fields of table it_map.
IF SY-SUBRC = 0.
LOOP AT IT_VEND.
MOVE : IT_VENDPLT-LIFNR TO IT_TAB-FIELD1,
IT_VENDPLT-ZPLTNAMEC TO IT_TAB-FIELD2,
IT_VENDPLT-CJI_CUSTOMER TO IT_TAB-FIELD3,
CONCATENATE :IiT_TAB-FIELD1 IT_TAB-FIELD2 IT_TAB-FIELD3 IT_TAB-FIELD4
INTO IT_LOAD-RECORD SEPARATED BY SEPARATOR.
TRANSFER IT_LOAD TO OUT_FILE.
ENDLOOP.
Can any body explain me hw to fetch DC and Bu from the table zdcxy and keep in the same loop of it_vend.
Second thing is that I need to give information about records into second output file hw to do that means I opened one more file and I am unable to move the record history there plz help me.
Thanks in advancePlz any body can help me it's argent.
Thanks
Basu -
Adding custom fields to the condition table in CRM
Hi all,
Our requirement is to download the sales conditions type from R3 to the CRM system. In one of the condition table we are trying to add shipping point( VSART ) and Special processing indicator (SDABW).
For that we have added the fields in the structure CND_MAPT_ACS_REM_CUST (Comm. Structure Condition Exchange Customer Exit R/3 Fields) and we have added the fields in the field catelog in transaction ( /SAPCND/CTCT - Maintain Condition Tables). Then we have mapped these fields in the view V_CND_MAP_CNVFLD.
Finally we run the adapter object of that particular table to download the details from R3, but the condition table in CRM is not getting activated, so the adapter object is giving the error.
Please help in this.
Thanks & Regards,
Raghuram.Hello Raghuram,
I feel that your issue is similar what i have faced, refer to my post:
Link: [Issue in customer specific price;
For solving this you can refer to detailed steps in, Note 514952 - Download of customer-specific tables.
Also additionaly you may need to run the report /sapcnd/rv12n001, as i also had to do so.
If not solved then let me know the relevant message in SLG1
Regards -
How to summary a field from 2 separate tables but having the same fields
Post Author: thuyvd78
CA Forum: General
Hi, I am getting trouble with creating the summary from 2 separate tables. These tables dont have any link together but they have the same fields, such as: part id, qty, etc. I need to create a report that displays whole the information from these tables and also the summary of total qty field of these tablesAny idea to organize this report? Thank you very much! ThuyPost Author: thuyvd78
CA Forum: General
Thank you for your help v361.where can I can get the link to download samples for subreport from official website?And can I use FULL INNER query to join these tables. I think this way is much clearer than using subreport but not sure it will work? Thanks Thuy -
Populating multiple text fields from a database table...
I have a database table with several fields e.g. drawing_no, title, date_entered etc..I have a form that has the same fields. I want to be able to input a value into drawing_no field, and have it retrieve all the other values from the database - if they exist, or return blanks/nulls if it does not exit. I know how to do this for a single field, but not for retrieving multiple fields
Hi ,
You can create a before header page process and fetch all the fields from database, or you can take a look at in-built process Automated Row Fetch.
For e.g. lets say u have field1, field2, field3, field4 and field5 based on col1, col2, col3, col4, col5 from table tab1
Now create a page process of type PL-SQL and give a meaningful name to the process and accept the default as on Load Before header. In the "Enter PL/SQL Page Process" block enter a code similar to this one
DECLARE
BEGIN
IF :drawing_no IS NOT NULL THEN
SELECT col1, col2, col3, col4, col5 INTO :field1, :field2, :field3, :field4, :field5
FROM tab1 WHERE drawing_no = :drawing_no ;
END IF;
EXCEPTION WHEN NO_DATA_FOUND THEN
NULL;
END;The above block will fetch the records into input fields every time u refresh the page.
Hope this helps.
Thanks,
Manish -
Can't get table field from two different tables if named same
select c.notes, o.notes
from cusomters c, orders o
:does not work in getting the RS.
:if i change database to:
select c.customer_notes, o.order_notes
from cusomters c, orders o
:then it works.
:i make PURE DYNAMIC META SQL database
applicaitons, and i need for abstract SQL tables.
i have the same problem in getting
the max values:
select
max(height),
max(weight),
max(age)
from person_stats
group by geographical_areaWhen you select from 2 different tables you need to join them on some condition, otherwise it has no idea how to associate the 2 tables together.
try select c.notes, o.notes from cusomters c, orders o where c.customer_id = o.customer.id or whatever the join fields are.
For the group by I believe you have to include the field that you group by:
select geopraphical_area, max(height), max(weight), max(age) from person_stats group by geographical_area
give them a try
Jamie -
Displaying Field name in a table
Hi,
I want to display the field names in a table.
Is it possible to achieve this through coding?
Regards,
Ram.Hi,
Please explain the requirement clearly.
Where you want to display the field names of the table.
Regards,
Umasankar -
Referencing a field from a resource table to a task table
Hello,
I have created a a resource field that is called "Internal Cost Rate" and I would like this field to be added to a Task table so that I can then reference it and make a simple calculation. For example in the Task Table I have the "Work Time"
and want to do with a multiplication to a third field so that:
"Sum of internal costs" = "Internal Cost Rate" * "Work Time"
When I try to add or reference the field in my task table, it is not available. The idea is that I want the "Internal Cost Rate" to be with the resource integrated. Any ideas?
Thank you very much in advance!
IoannisHi Ioannis,
I think we have to make a step backward since it is not possible to calculate an assignment cost based on 2 rates. But there might be different ways based on your need such as the fixed cost, cost custom fields, cost per use, cost resources...
Please give us some information about your initial business need so we can figure out a way to help you.
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
SAP Query Display data from 2 internal tables
Hi ABAP Gurus,
I am developing a SAP Query.
I have created an infoset with the custom infotype 9050 and added the table ZPA9050 into the Infoset.
How do I input values to the ZPA9050 fields? A checkbox for making a Selection field is not available in the Query (SQ01)
For every pa9050 entry there exist multiple records of ZPA9050. I need to display the pa9050 fields in the 1st row and the corresponding zpa9050 fields in the subsequent rows.
Kindly advise how to accomplish this task.
A quick reply is highly appreciated.
Useful answers will be rewarded.
Thanks
SriramHi Deepika,
Your reqirement is to print data from the two internal tables ..and if u r not using interactive alv then u need to merge data into single internal table... if anycase u dont want to merge in the table itab as u told u can use another final internal table in which u can merge data from the two previous interal tables then u pass this final internal table to ur FM.
Thanks & Regards
Ashu Singh -
How to find min and max of a field from sorted internal table
Hi,
I have sorted Internal Table by field f1.
How do I find max and min value of f1.
For min value of f1 I am using,
READ TABLE IT1 INDEX 1.
IT1-F1 = MIN.
Is this correct? And how do I find the max value of f1 from this table.
Thanks,
CDYes, that is right, and you can get the max like this.
data: lv_lines type i.
* get min
READ TABLE IT1 INDEX 1.
MIN = IT1-F1.
* get max
lv_lines = lines( it1 ).
read table it1 index lv_lines.
MAX = IT1-F1.
Regards,
Rich Heilman -
Match fields from the same table
Hi,
I have a table:
ID|TEXT1 |TEXT2
----------|------|---------------
1|1 |1
2|1 |0
3|1 |1
4|1 |0
5|1 |0
I want to match fields with the same text1 value bu without duplicates
I tried this:
select t1.id, t2.id from dane_testowe t1 left join dane_testowe t2 on t1.text1 = t2.text1 where t1.id <> t2.id;
but I got 20 rows (should be 10)
ID| ID
----------|----------
5| 1
4| 1
3| 1
2| 1
5| 2
4| 2
3| 2
1| 2
5| 3
4| 3
2| 3
1| 3
5| 4
3| 4
2| 4
1| 4
4| 5
3| 5
2| 5
1| 5
I'm new at pl/sql (sql), so could You explain me where is mistake?
Thanks in advanceI want to get only one combination like this
ID| ID
----------|----------
5| 1
4| 1
3| 1
2| 1
5| 2
4| 2
3| 2
5| 3
4| 3
For ex I don't want 2| 1 and 1| 2
Maybe you are looking for
-
I am moving to ColdFusion Builder from Dreamweaver and I am having issues with my html preview. I am trying to set up a project and give it the host header/url to use for html preview, but it keeps telling me that I don't have the ColdFusion server d
-
Can I use my iPhone 5 GPS' to give me direction while traveling in Europe?
Can I use my iPhone 5's GPS ( with global plan) while traveling in Europe?
-
In canvas design when i run the midp canas based screen
in canvas design when i run the midp canas based screen on the pocket pc it takes a lot much time to load and starting.can any body tell me the solution. or the reason why it takes much time to load on startup.
-
Photoshop Elements 3 Won't Open
I have previously been able to open PSE 3 with the new MacPro and 10.4.7, but it now refuses to open. I have reinstalled PSE 3 and repaired permissions, but no success. Any suggestions?
-
I bought Premiere Pro CS 6 and that program works fine. Encore does not open. All it says is: "Adobe Encore CS6 cannot run in non-royalty serialized mode. The application needs to be serialized with a royalty bearing serial number." How can I get th