Ravi
Can you post some samples of Peoplecode or how we should call a webservice.”
Thank you for posting your question
Please find the sample code for the given requirement.
Assumption made is – all other IB related configurations are taken care by the resource working on the requirement.
Sample Code for Executing webservice from personal data component:
import HX_SERVICES:HX_SyncPersonalData; /* importing the app class*/
Component string &Name_Changed; /* Variable for Name change*/
/*Variables for Personal Data Webservice*/
Local HX_SERVICES:HX_SyncPersonalData &Msgs = create KC_TER_SERVICES:KC_SyncPersonalData();
Local Message &MSG_P, &msg_Response;
/*Publication of KC_TER_PER_DATA_SYNC message*/
If &Name_Changed = “Y” And
%Mode <> %Action_Add Then
&msg_Response = &Msgs.OnRequestSend(&MSG_P);
End-If;
Sample App Class Code :
import PS_PT:Integration:ISend;
class HX_SyncPersonalData implements PS_PT:Integration:ISend
method HX_SyncPersonalData();
method OnRequestSend(&_MSG As Message) Returns Message;
end-class;
/* constructor */
method HX_SyncPersonalData
end-method;
method OnRequestSend
/+ &_MSG as Message +/
/+ Returns Message +/
/+ Extends/implements PS_PT:Integration:ISend.OnRequestSend +/
Local Message &msg_Send, &msg_Send2;
Local XmlDoc &xml;
Local XmlNode &childNode;
Local string &strXML;
Local SQL &FETCH_SQL, &UPD_SQL;
Local Rowset &rs_PERDATA, &rs_Message;
Local Record &rec_PERDATA;
Local string &DEPTID, &PED, &INITDT;
Local number &rwcnt, &TERBNBR;
/* set reference to service operation */
&msg_Send = CreateMessage(Operation.HX_PER_DATA_TER_SYNC, %IntBroker_Request);
/* create unpopulated standalone rowset and record */
&rs_PERDATA = CreateRowset(Record.HX_TER_PER_DATA);
&rec_PERDATA = CreateRecord(Record.HX_TER_PER_DATA);
Evaluate %Component
/* Modify Person*/
When = “PERSONAL_DATA”
&FETCH_SQL = GetSQL(SQL.HX_TER_PER_DATA_SQL, PERSON.EMPLID);
Break;
When-Other
/* Others */
Break;
End-Evaluate;
/* read sql records and insert rows in preparation for sending message */
While &FETCH_SQL.Fetch(&rec_PERDATA)
&rwcnt = &rs_PERDATA.ActiveRowCount;
&rs_PERDATA.InsertRow(&rs_PERDATA.ActiveRowCount);
&rec_PERDATA.CopyFieldsTo(&rs_PERDATA.GetRow(&rs_PERDATA.ActiveRowCount).HX_TER_PER_DATA);
End-While;
If &rwcnt > 0 Then
/* set a pointer to message structure from service operation*/
&rs_Message = &msg_Send.GetPartRowset(1);
/* populate message with returned rows from sql */
&rs_PERDATA.CopyTo(&rs_Message);
/* send the async message */
%IntBroker.Publish(&msg_Send);
End-If;
Return (&msg_Send);
end-method;
Thanks
Kamalakkannan
1) If you need to consume a web service, get the related WSDL file for the web sercvice.
2) Go TO Peopltools > Integration Broker > Webservices > Consume Webservice
3) Select WSDL file and run through the wizard.
4) This will create all the required infrastructure for consuming this webservice, like creating messages, services, service operations etc.
5) once this is done, below code can be used to call this service:
&Msg = CreateMessage(Operation.ASYNC, %IntBroker_Request);
&Msg.CopyRowset(&FlightProfile);
&Ib = %IntBroker;
&Ib.Publish(&Msg);
Thanks
Sachin
********************************
Vinay
How to create a record using application designer without getting ‘ PS_’ as the prefix for the table name
Thank you for posting your question
On the record type tab, use the “NON STANDARD sql tABLE NAME:”
Thanks
Sachin
********************************
Rahul Bagade
I am using CSV file & Component Interfave to upload data in Peoplesoft Component. Can you please tell me how to skip errorneous row?
My CSV file is having 10 rows and if there is an error on 5th row, I want to skip it and continue with 6th and above row.
Thank you for posting your question
1) You can try “try-catch” block in the code as one option
2) Alternatively, for each row before assigning it to the CI, conduct the validation on the data to catch the errors. If the row had errorneous data skip that row.
3) Third alternative is to use the PeopleSoft provided “EXCEL TO CI” utility, where you can upload multiple rows of data for the CI thought Excel sheet. For this refer to peoplebooks which provides step by step approach.
Thanks
Sachin
********************************
Sirihem
Application version is 8.4 and tools version 8.46.
In customer 360 degree view page, customer hierarchy, contact name is displayed. how to bring Title (field captured at contact page)beside contact name.
In 360 degree view, customer hierarchy, contact name should be displayed as Contact name – Title
Thank you for posting your question
1) Go To Setup CRM > Product Related > 360 Deg View
2) Go To the “Define Node”. Search the node that you want to modify.
3) On the define Node page there will be a view mapped to this node and the fields that are displayed.
4) You may have to open the view and modify the sql to append the title to the contact name field on the node.
Thanks
Sachin
********************************
Anil
While testing a Component interface RD_COMPANY_CI_API, I am getting call failed value for alternate search key fields under FindKeyInfoCollection.
Thank you for posting your question
Assuming that the user is doing the following:
1) In the application designer, Go To > Tools > Test Component Interface
2) Provide apporpriate SETID and click “Create New” button
3) The UI will show error for some of the fielDs, FOR EXAMPLE “BO_NAME”, bo_type_id, since these are not provided at this point to the CI.
3) The user should go to the collection items and proivde the required information and execute the methods on the CI.
4) It should save and create new company.
We can ask for more details as below:
1) Is the user trying to test using the above approach or calling the component interface from code.
2) Field names showing this error and is it while creating new company?.
Thanks
Sachin















Comments on this entry are closed.