Pass pernr to WebDynro
Hi Experts,
I have a requirement in which I need to pass PERNR from MSS team viewer to my Z WDA application.
I have tried the steps mentioned in the followin thread, but I am not able to get the value of PERNR to my Z application.
Pass pernr to WebDynro
Please help me with the requirement.
Regards,
Pranay
Hi,
as the note stated.
inside your z wd application subscribe to the portalevent like this
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
DATA lo_api_controller type ref to if_wd_view_controller.
lo_api_controller ?= wd_this->wd_get_api( ).
lo_api_component = wd_this->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
lo_portal_manager->subscribe_event(
portal_event_namespace = 'urn:com.sap.mss.employeesearch'
portal_event_name = 'selection_changed'
view = lo_api_controller
action = 'mss_emp_selected'
mss_emp_selected is a action , should be defined in the View.
Edit the ONACTIONESS_EMP_SELECTED method and insert the following 3 parameters as optional importing parameters.
PORTAL_EVENT_NAME
PORTAL_EVENT_NAMESPACE
PORTAL_EVENT_PARAMETER
The portal_event_parameter string contains the following information
Plan variant (2 characters)
Object type: (2 characters)
Start date of the object: (8 characters in the format yyyyMMdd)
End date of the object: (8 characters in the format yyyyMMdd)
Object ID: (remainder of the parameter string)
Example value would be "01P 200706012007123108154711".
Split the string accordingly and get the employee ID 08154711, use it for your employee data retrieval.
Similar Messages
-
Pass pernr from employee search iView to abap webDynpro in Related Activity
Hi All,
I have seen many threads explaining how to pass pernr from employee search iView to custom ABAP webDynpro application in the "Employee profile" page. Also seen sap note 1112733.
I am trying to launch custom ABAP webDynpro application from "Related Activities" view found in the employee information page in MSS. I want to pass pernr selected from Employee Search iView to the ABAP webDynpro application in "Related Activities" view.
In the ABAP webDynpro application, I am listening to the portal event (as per note 1112733) but the ABAP webDynpro can not catch the event.
Anyone has passed pernr from employee search iView to the ABAP webDynpro application launched from "related activities" view?
Regards
AshutoshHi Ashutosh,
can you tell me exactly what you did? I have the same issue.
Thanks,
Joeri -
Hello,
HAve a requirement in which i will need to pass pernr from a normal program to an HR program, I am using a submit program for the same, how do i default the selection screen of my HR program with the pernr number i pass from my normal program ?sorry just landed up with the solution, thanks
-
I need to pass PERNR to Feature GBPGL (PE03)
Hi,
We are using feature GBPGL and as part of decision tree we need the PERNR value.
PERNR is not one of the fields in PME02 which is used by the feature GBPGL. I have therefore appended structure PME02 with the PERNR field and have added this successfully to the decision tree i.e:
000010 D ABKRS
000020 10 D PERNR
000030 10 00440070 &GBPGL=01.06.2009,
000040 10 ******** &GBPGL=01.05.2009,
When it hits pernr 440070 it should return date 01.06.2009, however although the ABKRS field is filled, the PERNR field has no value. Thus, when the feature is run for pernr 440070 it goes to line 40 (above) and returns a date of 01.05.2009.
The data is correct in that I have an absence for the period in which I am running the payroll calculation.
I need to know how to pass the value in PERNR to my feature?GBPGL uses PME02 and that structure don't have perner field,
I have couple of questions,
How did you appended structure PME02 ? did you make any changes in the standard?
When you already have ABKRS what is the need of perner there?
Best Regards,
JR -
How to pass PERNR from Handle default to view
Hi,
We are using custom WDP ABAP application for EMP Leave Request, here I need to call the RFC HRASR_WDA_GET_EMPLOYEE in window's handle default method.
Once I call this RFC how to pass this pernr to view.In view already field as designed and mapped for PERNR
Plz give some solutions.
Regards
RajeshHi Rajesh,
Did you create any node with the PERNR only included in it, under Component Controller and Map it to the Window Context Node??
If you do this, you can pass the data from your Handle_default method to the Component Controller and then accordingly you can access the data anywhere you need.
I hope, this will help your problem.
Regards,
-Wahid Hussain. -
How to get PERNR from employee search(teamviewer) iView in to a WD-4-ABAP.
Hello All,
I had developed a new Web Dynpro for ABAP (WD4A) component for updating a custom Infotype. This application is meant for the manager to maintain some specific data through portal for his employees in the team.
WD4A application is built based on the employee number it receives from the portal.
How could I get PERNR from employee search(teamviewer) iView in to my WD4A component?
In portal I had developed a test page by copying the standard page from MSS com.sap.pct.erp.mss.general_information, and added my WD4A application through an iView into this page.
Then I hided all the other iVews in the page except (1) employee search and (2)my WD4A iVew. On the preview everything appears fine.
During the preview of this page it triggers the WDDOINIT of WD4A component main view and then the WDDOMODIFYVIEW. When I select an employee from the employee search, then it triggers only WDDOMODIFYVIEW in the WD4A application and not the WDDOINIT anymore.
In my WDDOMODIFYVIEW I had inserted the following code:
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
DATA lo_api_controller TYPE REF TO if_wd_view_controller.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_portal_manager->subscribe_event
EXPORTING
portal_event_namespace = 'urn:com.sap.mss.employeesearch'
portal_event_name = 'selection_changed'
view = lo_api_controller
action = 'GET_SELECTED_PERNR'.
And in the action: 'GET_SELECTED_PERNR'
METHOD onactionget_selected_pernr .
DATA lv_str_pernr TYPE string.
DATA lv_strlen TYPE i.
DATA lv_pernr TYPE pernr_d.
DATA lv_offset TYPE i.
wdevent->get_string(
EXPORTING
name = 'PORTAL_EVENT_PARAMETER'
RECEIVING
value = lv_str_pernr ).
lv_strlen = STRLEN( lv_str_pernr ).
lv_offset = lv_strlen - 8.
lv_pernr = lv_str_pernr+lv_offset(8).
ENDMETHOD.
This is not functioning form me. The action is not getting trigged with the code in WDDOMODIFYVIEW.
I had gone through several threads in u2018SDN say:
Pass pernr to WebDynro
MSS - General Information - Related Activities Links persnr.
SAP Note: 1112733.
Most of the threads are answered but incomplete. In some threads people shared document personally which had been helpful.
I am stuck with this scenario of handling the employee number from employee search iView. Helpful suggestions will be rewarded for sure.
Thanks in advance.Do i understand you correctly that you are not getting the portal event ?
This can be several reasons ?
Both portal system and WDA server has to be in same domain and same proptocol to communicate with Portal event.
Please check in that direction and search posts on this topic. -
To pass perner in Function Module
Dear All,
I have a requirement where I have to send a mail to the new hired employee at the time of creation of IT0105- subtype 0010(email-ID) I have wriiten a code for this
IT STYP Feild FC No. S Variable funct.
0105 0010 USRID_LONG 04 011 f xxx(Z_yyy)
It is working fine through this I can call subroutine and mail is triggering at the time of creation of It0105. But here in z report my Ababper is harcoaded the pernr and he need form me to pass the perticular pernr to his Z report and then that program will send mail to that perner .. suggest me How can I pass pernr or any value to the ABAP report which I will call in my dynamic action. Or I can store the pernr to any field in the dynamic action from where the abap program will call it.
##MY ABAPER wants me to pass perner to his Report for sending the mail to tht perticular perner.Hi,
Please ask the ABAPer to just use P0105-PERNR within Z-report.
It should work.
Please refer to the following WIKI page for reference:
http://wiki.sdn.sap.com/wiki/display/ERPHCM/HowtoCreateaDynamic+action
Regards,
Dilek -
PERNR in BAPI_ACC_DOCUMENT_POST
Hi,
I am using BAPI_ACC_DOCUMENT_POST for posting FI Doc in my program.
How can i pass PERNR in BAPI_ACC_DOCUMENT_POST.
Thanks
ShrutiHi,
To my knowledge there is no such possibility in a "std" field.
What I did in the past is to use the either field "Assignment Number" (BAPIACGL09-ALLOC_NMBR) or the "Text" field (BAPIACGL09-ITEM_TEXT). Both fields on item level of course.
The field used of the two suggested options above can then be used in follow on procedures where the item field is read from the FI dcoument. This should a no brainer.
Regards, Johan -
RESIS and RACKY mappings for PERNR
hi...
Infotype PA0077 has RACKY. Check table for RACKY field is T505R. However here the key is formed using MOLGA and RACKY.
Can anyone suggest for a pernr how this value of MOLGA is determined.
Also for Infotype PA0094 field RESIS, check table is T505U for which again the key fields are MOLGA and RESIS.
The question again here is how do i relate a pernr to this MOLGA.
To summarize I have resis and racky for a pernr. I have to fetch the long text for these fields. However I am not sure on what MOLGA value to associate them with to fetch these texts. Please guide.u can pass pernr to beow fn module to fetch molga....and do the rest as required
call function 'RH_PM_GET_MOLGA_FROM_PERNR'
EXPORTING
pernr = pernr
IMPORTING
molga = molga
EXCEPTIONS
nothing_found = 1
no_active_plvar = 2
others = 3. -
Performance issue in HR Payroll Report
Hi Experts
I having performance issue in HR payroll report
My issue as follows
I have selection period to select date range
if I select start date & end date Which is giving EMP name, wage type,wage text, amount, etc
whenever I excute it takes morethan one hour to get the resust
my code is some wht like this
loop at GT_REDIR where
begda(start date) ge pnpbegda and
endat(end date) le pnpendat and
paytyp eq ''
move gt-sqnr to lv_sqnr
call function PYXX_READ_PAYROLL_RESULT
here i am passing pernr and sequence number
please give me some idea to fix this issue
Thanks in Advance
Gopinath SubramanyamHi Jhings
Thanks for Your immediate reply
data is coming from cluster table and also I am using Logical database
I will post my code here soon
Regards
Gopinath subramayam -
Can we lock set of employees at a time?
Hi everyone,
I need to maintain Infotype records for a set of Employees. Function module 'HR_EMPLOYEE_ENQUEUE' locks only a single employee at at time. I can pass pernrs through loop...endloop, but if there are multiple records of a single employee, lock and unlock happens for every loop.
Is there any FM to lock multiple employees?
Thanks in advance,
csHi cs,
Please use FM HR_ENQUEUE_OBJECT_LIST with object type P.
Regards,
Dilek -
Unable to display employee image in pdf forms from webdynpro?
hi friends,
i am using webdynpro application and ADOBE forms. i designed adobe form with 3 fields. IM_VORNA, IM_NACHN, IM_PHOTO.
I created one interface of adobe form also with the 3 fields of which specified above.
And i am using webdynpro application to get the details of emplyee by passing pernr.
i created a view. in this, and i attached every thing interface context. And in methos tab, wddoinit method i wrote code like this...
DATA pernrid TYPE PERNR-PERNR. "tdobname.
DATA temp TYPE c.
DATA: p_connect_info TYPE TOAV0,
wa_p_connect_info TYPE TOAV0,
p_document_type TYPE TOAV0-RESERVE,
exists TYPE c.
DATA: url TYPE char255,
turl TYPE string,
turl1 TYPE xstring.
DATA lo_nd_z_if_test_cv TYPE REF TO if_wd_context_node.
DATA lo_el_z_if_test_cv TYPE REF TO if_wd_context_element.
DATA ls_z_if_test_cv TYPE wd_this->element_z_if_test_cv.
* navigate from <CONTEXT> to <Z_IF_TEST_CV> via lead selection
lo_nd_z_if_test_cv = wd_context->get_child_node( name = wd_this->wdctx_z_if_test_cv ).
* get element via lead selection
lo_el_z_if_test_cv = lo_nd_z_if_test_cv->get_element( ).
* get all declared attributes
lo_el_z_if_test_cv->get_static_attributes(
IMPORTING
static_attributes = ls_z_if_test_cv ).
* *** Vorna and Nachn.
ls_z_if_test_cv-im_vorna = 'shankar'.
ls_z_if_test_cv-im_nachn = 'chamala'.
***pernr
pernrid = '00000003'.
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = PERNRID
* P_TCLAS = 'A'
* P_BEGDA = '18000101'
* P_ENDDA = '99991231'
IMPORTING
P_EXISTS = exists
P_CONNECT_INFO = P_CONNECT_INFO
EXCEPTIONS
ERROR_CONNECTIONTABLE = 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.
P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
CALL FUNCTION 'SCMS_DOC_URL_READ'
EXPORTING
* MANDT = SY-MANDT
STOR_CAT = SPACE
CREP_ID = P_CONNECT_INFO-ARCHIV_ID
DOC_ID = P_CONNECT_INFO-ARC_DOC_ID
* PHIO_ID =
COMP_ID = 'DATA'
* SIGNATURE = 'X'
* SECURITY = ' '
* USE_LOCATION = 'A'
* LOCATION = ' '
* HTTP_URL_ONLY = ' '
DP_URL_ONLY = 'X'
* LIFETIME = ' '
* NO_CACHE = ' '
* EXPIRATION =
* PDF_MODE = ' '
* URL_EXTENTION = ' '
* FORCE_GET = ' '
IMPORTING
URL = URL
EXCEPTIONS
ERROR_CONFIG = 1
ERROR_PARAMETER = 2
ERROR_SIGNATURE = 3
HTTP_NOT_SUPPORTED = 4
DOCGET_NOT_SUPPORTED = 5
NOT_ACCESSABLE = 6
DATA_PROVIDER_ERROR = 7
TREE_NOT_SUPPORTED = 8
NOT_SUPPORTED = 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.
turl = url.
CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'
EXPORTING
* CODEPAGE_TO = '8500'
UNICODE_STRING = turl
* OUT_LEN =
IMPORTING
XSTRING_STREAM = turl1
EXCEPTIONS
INVALID_CODEPAGE = 1
INVALID_STRING = 2
OTHERS = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_z_if_test_cv-im_photo = turl1.
*** Get the Photographs
*CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
* EXPORTING
* p_object = 'GRAPHICS'
* p_name = pernrid
* p_id = 'BMAP'
* p_btype = 'BCOL'
* receiving
* p_bmp = ls_z_if_test_cv-im_photo
* EXCEPTIONS
* not_found = 1
* internal_error = 2
* others = 3
*IF sy-subrc EQ 0.
** MOVE 'y' TO temp.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*** Send the values back to the node
lo_el_z_if_test_cv->set_static_attributes(
EXPORTING
static_attributes = ls_z_if_test_cv ).
But here the problem is when i executed this application i am able to see the VORNA and NACHN fields in ADOBE Form. But the employee photo is not appearing in adobe form.
Here employee photo i amretreving from archive link.
Even i set the Imagefield property URL in Adobe forms. i.e $record.IM_PHOTO.
Any solutions regarding this...
Regards,
Shankar.Hi Shankar,
according to the sap documentation (inserting a graphic), I could imagine the following problems
1.) image file type is not supported (-> "see the online help in Adobe LiveCycle Designer under Defining Object Properties ® Image Fields ® About Image Fields" )
when you use "Graphic Reference"
2.) url could not be accessed.(-> "This means that you may have to configure appropriate access rights for Adobe Document Services (ADS)" ).
Maybe this will help you finding the problem.
Regards,
Andreas -
Function module to get name of the employee
hi friends
I am working in HCM workflows. Is there any function module which gives the name of the employee when i pass pernr and userid.
Regards
vijayhi,
use HR_READ_INFOTYPE on infotype 0002
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = p_pa0002-pernr -----------> your pernr
infty = '0002'
TABLES
infty_tab = t_pa0002
EXCEPTIONS
infty_not_found = 1.
the fields
INITS NACHN NAME2 NACH2 VORNA CNAME
TITEL TITL2 NAMZU VORSW VORS2 RUFNM MIDNM
KNZNM
stores different parts of employee's name.
you check your required one.
Regards,
Anirban -
Need help in creating process codes
Hi All,
I need to create some message type and assign it to some idoc type , and i need to create process code and inbound function module for this.
Can some one please help me in this regard.
Thanks ,
Hemhi
CATSDB CUSTOM IDOC TRANSFERMATION BETWEEN 2 DIFFERENT APPLICATION SERVERS
For this scenario Client 800 of application server SAPADM is the Sender and client 800 of application server SAP-REMOTE is the Receiver
1. Creating Logical Systems
o Login using 800 client
o Go to T. Code SALE
o Expand Sending and Receiving Systems
o Expand Logical Systems
o Click on Define Logical System
o Click on New Entries
o Create CATSSENDER, ECC Logical Systems
o Save and come back
o Assign the CATSSENDER Logical System to client 800 of Application Server SAPADMAssign the ECC Logical System to client 800 of Application Server SAP-REMOTE
2. Creating the RFCs
o Go to T. Code SM59
o Expand R/3 Connections
o Enter RFC Name as CATSSENDER
o Connection Type as 3
o Language as EN
o Client as 800
o User as SAPUSER
o Password as YESV13
o Target host as SAPADM
o Click on Remote logon button to test the RFC
o Enter RFC Name as ECC
o Connection Type as 3
o Language as EN
o Client as 800
o User as SAPUSER
o Password as YESV123
o Target host as SAPADM
o Click on Remote logon button to test the RFC
3. Creating the Message Type
o Go to T. Code WE81
o Click on change, continue
o Click on New Entries button
o Give message type as ZCATSTIME and description
o Save and back
4. Creating the Segment
o Go to T. Code WE31
o Give segment name as ZSEGMENTTIME
o Enter Short Text
o Enter the Field Name and Data Element in the text boxes
o Save, continue,
o Click on Edit -> Set Release
5. Creating the Basic IDOC Object
o Go to T. code WE30
o Give obj. name as ZTIMEIDOC
o Click on create
o Select create new radio button, give description and continue
o Select the IDOC obj name and click on create button
o Enter the segment name which is create earlier
o Select the check box if you want to make the segment mandatory
o Enter 1 in minimum number 99999 in maximum number, continue
o Save and backo Click on Edit -> Set Release
6. Creating Customer Distribution Model
o Go to T. Code BD64
o Click on change and Create model view button
o Enter the short text and Technical name as CATSSENDER
o Select the model and click on Add Message Type Button
o Give the Sender as CATSSENDER,
o Receiver as ECC,
o Message Type as ZCATSTIME
o Select the model view & click on Environment -> Generate Partner Profiles
o Select Transfer IDOC Immediately and Trigger Immediately radio buttons
o Click on Execute
o You should get a list in green color which means it executed successfully.
o Back to main screen, select the model view
o Click Edit->Model view->Distribute
o Click on continueo
You should get a list saying model view is distributed successfully.
7. Checking the Port
o Go to T. Code WE21
o Expand Transactional RFC
o Find the port from the list which is created using BD64 for ECC (Receiving system) RFC Destination.
8. Checking the Partner Profiles.
o Go to T. Code WE20
o Expand Partner Type LS
o Select the Partner profile ECC
o Double click on Message Type ZCATSTIME in Outbound parmtrs.
o Check Receiver Port is assigned correctlyo
Check the Basic type as your Basic IDOC object.
9. Assigning the Message Type to Basic IDOC Object
o Go to T. Code WE82
o Click on Change & continue, New Entries button
o Give the Message type as ZCATSTIME
o Give Basic Type as ZTIMEIDOC
o Release as 4.6C
o Save and back10. Creating Inbound Function Module (Posting Program)
o Go to T. Code SE37
o Create a function Module ZCATSDB_TIMESHEET_SURESH
o Set the Processing type as Remote Enabled Module and mode as start immed, in Attributes Tab.
o Import Parameters
P_WORKDATE LIKE CATSDB-WORKDATE
P_COUNTER LIKE CATSDB-COUNTER
P_LSTAR LIKE CATSDB-LSTAR
o Export Parameters
o Tables
S_PERNR LIKE ZCATSPERNR
[PERNR is select option parameters in ZCUSTOMIDOC report program so that it should be passed to function module ZCATSDB_TIMESHEET_SURESH in tables section. And also in tables section we used ZCATSPERNR, which is a global structure, which contains four fields as
Ø SIGN
Ø OPTION
Ø LOW
Ø HIGH]
o Exceptions
o Source Code
FUNCTION zcatsdb_timesheet_suresh.
""Local interface:
*" IMPORTING
*" VALUE(P_WORKDATE) LIKE CATSDB-WORKDATE
*" VALUE(P_COUNTER) LIKE CATSDB-COUNTER
*" VALUE(P_LSTAR) LIKE CATSDB-LSTAR
*" TABLES
*" S_PERNR STRUCTURE ZCATSPERNR
TABLES: catsdb, edidc, edidd. " using structures of catsdb, edidc, edidd
CONSTANTS: c_doctyp TYPE edidc-idoctp VALUE 'ZTIMEIDOC', " idoc type
c_segnam TYPE edidd-segnam VALUE 'ZSEGMENTTIME', "segment type
c_mestyp TYPE edidc-mestyp VALUE 'ZCATSTIME'. " message type
*001 comment begin
creating internal tables with out header lines for catsdb, edidc, edidd and also
- work areas
*001 comment end
DATA: it_edidc TYPE edidc OCCURS 0, " control internal table with out header line
it_edidd TYPE edidd OCCURS 0, " data internal table with out header line
wa_catsdb TYPE it_catsdb1, " work area for it_catsdb internal table
wa_edidc TYPE edidc, " work area for it_edidc internal table
wa_edidd TYPE edidd, " work area for it_edidd internal table
wa_zsegmenttime TYPE zsegmenttime, " work area for zsegment internal table
v_occmax TYPE idocsyn-occmax,
v_nbseg TYPE i.
CLEAR wa_catsdb. " clears work area of catsdb
CLEAR wa_edidc. " clears edidc work area
*002 comment begin
Save the message type and the basic IDoc type in the control segment.
*002 comment end
MOVE c_mestyp TO wa_edidc-mestyp. " assigning custom message type to edidc workarea
MOVE c_doctyp TO wa_edidc-idoctp. " assigning custom idoc type to edidc workarea
*003 comment begin
Retrieve the maximum number of segments in the basic IDoc type.
*003 comment end
SELECT MIN( occmax ) FROM idocsyn INTO v_occmax WHERE idoctyp EQ c_doctyp AND segtyp EQ c_segnam.
*004 comment begin
Save the whole CATSDB table content in the IT_ZCATSDB internal table.
*004 comment end
SELECT pernr workdate lstar counter FROM catsdb INTO CORRESPONDING FIELDS OF TABLE it_catsdb WHERE pernr IN s_pernr AND workdate EQ p_workdate.
*005 comment begin
Create a data segment for each line of IT_ZCATSDB.
*005 comment end
IF sy-subrc EQ 0.
LOOP AT it_catsdb INTO wa_catsdb WHERE pernr IN s_pernr.
MOVE-CORRESPONDING wa_catsdb TO wa_zsegmenttime.
CLEAR wa_edidd.
MOVE c_segnam TO wa_edidd-segnam.
MOVE wa_zsegmenttime TO wa_edidd-sdata.
APPEND wa_edidd TO it_edidd.
CLEAR wa_catsdb.
CLEAR wa_zsegmenttime.
ENDLOOP.
ELSE.
MESSAGE 'NO DATA FOUND FOR GIVEN SELECTION' TYPE 'I'.
ENDIF.
*006 comment begin
Count the number of data segments.
*006 comment end
DESCRIBE TABLE it_edidd LINES v_nbseg.
*007 comment begin
If the number of data segments exceeds the maximum allowed number,then display an error message.
*007 comment end
IF v_nbseg GT v_occmax.
MESSAGE 'IDOC ERROR Message' TYPE 'E000'.
ENDIF.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' " for creating an catsdb idoc
EXPORTING
master_idoc_control = wa_edidc
OBJ_TYPE = ''
CHNUM = ''
TABLES
communication_idoc_control = it_edidc
master_idoc_data = it_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 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.
ENDFUNCTION.
Save, check and activate
111. Assigning the Inbound Function Module to Basic Type & Message Type
o Go to T. Code WE57
o Click on change, continue, continue and New Entries Button
o Enter the Module as ZCATSDB_TIMESHEET_SURESH Type as "F"
o Basic Type as ZTIMEIDOC
o Message Type as ZCATSTIME
o Direction as 2
o Save and back
Now Login in 800 client of Application Server SAP-REMOTE
12. Assigning the Inbound Function Module in ALE Table
o Go to T. Code BD51
o Click on continue, New Entries button
o Give the Inbound Function Module ZCATSDB_TIMESHEET_SURESH
o Give Input t. as 0 (zero)
o Save and back13. Creating Process Code
o Go to T. Code WE42
o Click on Change, New Entries Button
o Give Process Code name as ZCATSDB, give Description & Save
o Select Processing with ALE Services Radio button
o Select Processing by Function Module Radio button
o Click the ALE Table (arrow Icon) in Identification
o Give the Function Module Name ZIDOC_INPUT_ZBAPI_STUD_MAS
o Give maximum number of repeats 0
o Save and back, back
o Select the process code from the list & click on Logical Messages Icon
o Give the Message Type as ZCATSTIME
o Save & Back, Save & Back, Save & Back
14. Changing the Customer Distribution model in receiving system
o Go to T. Code BD64
o Click on change and Create model view button
o Enter the short text and Technical name as CATSECC
o Select the model view & click on Environment -> Generate Partner Profiles
o Select Transfer IDOC Immediately and Trigger Immediately radio buttonso Click on Execute You should get a list in green color which means it executed successfully.15. Assigning the Process Code to Message Type in Receiving System
o Go to T. Code WE20
o Expand Partner Type LS
o Select the Partner Profile CATSSENDER
o Double click on Message Type ZCATSTIME in Inbound parmtrs.
o Give the Process Code as ZCATSDB
o Click on Trigger Immediately Radio button
o Save & Back
Save & Back
16. Creating the Selection Program (Outbound Program)
- Login in client 800.
- Go to T. Code SE38
- Create a Report Program as ZCUSTOMIDOC with the following code
REPORT ZCUSTOMIDOC
NO STANDARD PAGE HEADING.
TABLES:catsdb. " using structure of cats db table
*000 comment begin
this selection screen contains one select option and one parameter
*000 comment end
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS pernr FOR catsdb-pernr.
PARAMETER: workdate LIKE catsdb-workdate,
LSTAR like catsdb-LSTAR,
COUNTER like catsdb-counter.
SELECTION-SCREEN: END OF BLOCK b1 .
DATA: wa_val TYPE i.
wa_val = pernr-high - pernr-low.
*001 comment begin
calling custom function module
*001 comment end
CALL FUNCTION 'ZCATSDB_TIMESHEET_SURESH'
EXPORTING
p_workdate = workdate " passing workdate parameter
p_LSTAR = LSTAR
p_counter = counter
TABLES
s_pernr = pernr. " passing pernr select option
IF sy-subrc EQ 0.
MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' pernr-low ' AND ' pernr-high .
MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' PERNR-LOW 'TO' PERNR-HIGH.
gives information message if idocs are created for given employees
ELSE.
MESSAGE e000(zaluri) WITH 'NO IDOCS CREATED FOR EMPLOYEES' pernr-low 'TO' pernr-high. " gives error message
" if idoc is not created
17. Transferring the CATSDB records from sender Application Server SAPADM to receiver Application Server SAP-REMOTE
- Execute Report Program ZCUSTOMIDOC
- Give the Range of PERSONNEL NO'S, Date, Activity Type, Counter to Transfer
- Give Message Type as ZCATSTIME
- Give Receiver Logical system as ECC
- Execute
- You should get the IDOC Number
- Take the IDOC Number and go to T. Code WE05 & Execute
- In Outbox you can see the IDOC Status
- Select the status record in left side window
- Double click on the Status record in right side window- You can see the Control Record, Data Record and Status Records for that IDOC
If the ICON is green and the status code is 3, it means the IDOC is passed to PORT Successfully
18. SENDING IDOCS FROM APPLICATION SERVER SAPADM
TO APPLICATION SERVER SAP-REMOTE USING WEDI
- Go to T. Code WEDI & execute or T. Code WE19
- Give idoc number it is generated recently
- Continue & double click on segment to view data in segment
- Click on EDIDC to give port, partner no, message type, partner
type of receiver. [For sender no need to give any port no leave it as
blank]
- Click on Standard Outbound Processing button and click continue
- You will get a message as idocs successfully transferred
Now Login in Receiver 800 client
- Go to T. Code WE05 & Execute
- You can see the status record in left side window
- If the status no is 53 and color is green, it means the IDOC is posted to Application successfully.
- You can see the Log Information by double clicking on the status record in right side window.
- Now in left side window, you can see the Control Record, Data Record & Status Record of the IDOC
- Now go to T. Code SE16
- Give the table name CATSDB & press F7
- See the contents of the table
- The table is updated with the catsdb records transferred from 800 client with our selection program.
regards
Nagesh.Paruchuri -
Hi experts,
In my scenario i have to display smartform from WDA. The smartform will show the employee records when i pass PERNR as the input parameter. i have used the following FM's SSF_FUNCTION_MODULE_NAME and CONVERT_OTF. and converted it into PDF and binded the source file to interactive form. Now the form is getting displayed.
My problem is when i pass single pernr its fetching the record of particular pernr and when i pass multiple pernr its not fetching the records of multiple pernr.
when i set the value for below control parameter its getting values for single pernr:-
cparam-no_dialog = 'X'.
cparam-preview = 'X'.
cparam-getotf = 'X'.
when i set values for these parameters cparam-no_open = 'X' and cparam-no_close = 'X' to fetch multiple PERNR nothing is getting displayed in the form.
What should i have to do to show multiple records. Is any other control parameters is to be passed.
Please help me out of this issue.
Regards,
Susil.Susil,
It has something to do the logic inside the smartforms,nothing with the control parameters
Thanks
Bala Duvvuri
Maybe you are looking for
-
Firefox crashes when I try to start it up
<blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/897418]]</blockquote> '''''''OOPS! Sent wrong crash report ID below is the correct one'''. ''''FF 8 was working for a few days after I upgraded to it and then it crashed and
-
My phone LCD screen cracked, and now i cant see the screen at all, but the sound still works, and i can still make and receive calls. Im trying to figure out how to connect it to my computer, but when i put the USB in, it prompts me to click the PC s
-
How to Transfer photo from iPhoto to a windows pc ?
Hi everybody, I'm looking for how to transfer photo from iphoto to a windows pc. I can't copy photo from iphoto to put in on a USB key ... Please help me !!!
-
The preview of my folio only works on iPad when i submit it per USB cable. The content viewer on my mac works too. When i submit the folio online, the submitting stops with this error: When i click "try again" it seems to work, bit the article on the
-
AdminTask_MakeDim.dts. not working
Following is from Data Manager Guide "1. Open Data Manager and select eData > Organize Package List. The Organize package list dialog is displayed. 2. From the toolbar, click the Add Package icon. The Add Package dialog is displayed. 3. Select File i