Problem in using function module parameters in abap program
i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND' i got the problem using the function module parameters in my abap program.
these are the parameters inside fm
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_FIELDCAT) TYPE AIND_FCAT
*" VALUE(I_FIELDS) TYPE TABLE OPTIONAL
*" VALUE(I_OBLIGATORY_FIELDS) TYPE TABLE OPTIONAL
*" EXPORTING
*" VALUE(E_INFOSTRUC) TYPE AIND_DESC
*" REFERENCE(E_ALL_FIELDS) TYPE TABLE
*" REFERENCE(E_MATCHING_FIELDS) TYPE TABLE
*" EXCEPTIONS
*" NO_INFOSTRUC_FOUND
i want to declare E_ALL_FIELDS parameter in my abap program,
i have declared as
data: E_ALL_FIELDS TYPE TABLE.
but the system throws error that
'type of field 'TABLE' is generic .no table line has been specified'.
i want to use it in my abap program how can i declare in my abap program .
You have to declare the table using any specific type.
The type table in the FM is generic so you can pass any type you need.
For instance:
TYPES: BEGIN OF ty_fields,
fieldname LIKE dfies-fieldname,
END OF ty_fields,
TYPES: TY_T_GLU1 LIKE GLU1 OCCURS 0,
ty_t_fields type ty_fields occurs 0.
DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
lt_matching_fields TYPE ty_t_fields WITH HEADER LINE.
CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
EXPORTING
i_fieldcat = ft_fieldcat-fieldcat
i_fields = ft_fields_filled[]
IMPORTING
e_infostruc = lv_info_struct_name
e_all_fields = lt_info_struct_fields[]
e_matching_fields = lt_matching_fields[]
EXCEPTIONS
no_infostruc_found = 1.
Similar Messages
-
Hi,
We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
Thanks,
RaviHi,
Step1-Create a table structure which you need to create same as the fields you require in you data source.
Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
Step 3-create infoset query.In the infoset query give your table structure name and program name which you developed.
Step4-create data source on top of that query -
Problem when using function module : SO_NEW_DOCUMENT_SEND_API1
hi,all
when i use this function module to send external email ,a strange problem has been encountered. After executing this FM,i find that the return parameters SY-SUBRC = 0 . but when i use tcode SCOT to check the email in SAP email box,nothing has been found.
could anyone please give me a clue about where the error occur ?you can try using commit work fter sy-subrc check.
and also Try calling this Function module SO_DEQUEUE_UPDATE_LOCKS
if sy-subrc eq 0.
commit work.
call function 'SO_DEQUEUE_UPDATE_LOCKS'.
endif. -
Problem when using function module PYXX_READ_PAYROLL_RESULT giving dump.
When i am using PYXX_READ_PAYROLL_RESULT function module to get HR cluster data. I am getting following dump.
So,can any one help me to solve this issue.I want this function data.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "PYXX_READ_PAYROLL_RESULT" "(FUNCTION)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
Call to FORM "IMPORT_RESULT" is incorrect:
The actual parameter no. 2 has a different data type in the
PERFORM than requested for the FORM "IMPORT_RESULT" in program "%_T0LJ20".
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 1
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULT
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 137
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULTFind below is my code can u tell me wch type is not true .i tried but not able to find prob solution.
Plz help me waiting for reply.
TYPE-POOLS: SLIS.
DATA : FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv,
it_eve TYPE slis_t_event,
V_LAYOUT TYPE SLIS_LAYOUT_ALV.
wa_eve TYPE slis_alv_event.
*DATA header TYPE slis_t_listheader WITH HEADER LINE.
*DATA: ls_fcat TYPE slis_t_fieldcat_alv,
l_lin TYPE i.
*DATA: ls_event TYPE slis_alv_event.
DATA : WA_COLNO(2) TYPE N VALUE '1'.
DATA : REPID LIKE SY-REPID.
TABLES: PA0001,PA0002,T001P,T528T,T527X,T503T.
DATA:BEGIN OF IT_PA0002 OCCURS 0,
PERNR LIKE PA0002-PERNR,
END OF IT_PA0002.
DATA:BEGIN OF IT_PA0001 OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLANS LIKE PA0001-PLANS,
WERKS LIKE PA0001-WERKS,
BTRTL LIKE PA0001-BTRTL,
ORGEH LIKE PA0001-ORGEH,
PERSK LIKE PA0001-PERSK,
END OF IT_PA0001.
DATA: BEGIN OF IT_T528T OCCURS 0,
PLANS LIKE T528T-PLANS,
PLSTX LIKE T528T-PLSTX,
END OF IT_T528T.
DATA: BEGIN OF IT_T001P OCCURS 0,
WERKS LIKE T001P-WERKS,
BTRTL LIKE T001P-BTRTL,
BTEXT LIKE T001P-BTEXT,
END OF IT_T001P.
DATA: BEGIN OF IT_T527X OCCURS 0,
ORGEH LIKE T527X-ORGEH,
ORGTX LIKE T527X-ORGTX,
END OF IT_T527X.
DATA: BEGIN OF IT_T503T OCCURS 0,
PERSK LIKE T503T-PERSK,
PTEXT LIKE T503T-PTEXT,
END OF IT_T503T.
DATA:BEGIN OF IT_FINAL OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLSTX LIKE T528T-PLSTX,
BTEXT LIKE T001P-BTEXT,
ORGTX LIKE T527X-ORGTX,
PTEXT LIKE T503T-PTEXT,
END OF IT_FINAL.
*DATA: WI_RT LIKE LINE OF PAYROLL-INTER-RT,
*DATA: WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
DATA: IT_EVP TYPE HRPY_TT_RGDIR,
ls_evp LIKE LINE OF IT_EVP,
WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
WI_PAYRESULT TYPE PAY99_RESULT.
WI_PAYRESULT TYPE STANDARD TABLE OF PAYUS_RESULT WITH HEADER LINE.
DATA WG_MOLGA LIKE T500L-MOLGA.
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECT-OPTIONS: S_PERNR FOR PA0001-PERNR,
S_BTRTL FOR PA0001-BTRTL,
S_ORGEH FOR PA0001-ORGEH.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CATLOG.
PERFORM DISPLAY_DATA.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT PERNR
INTO CORRESPONDING FIELDS OF TABLE IT_PA0002
FROM PA0002
WHERE PERNR IN S_PERNR.
IF IT_PA0002[] IS NOT INITIAL.
SELECT PERNR ENAME PLANS WERKS BTRTL ORGEH PERSK
INTO CORRESPONDING FIELDS OF TABLE IT_PA0001
FROM PA0001
FOR ALL ENTRIES IN IT_PA0002
WHERE PERNR = IT_PA0002-PERNR
AND BTRTL IN S_BTRTL
AND ORGEH IN S_ORGEH.
ENDIF.
IF IT_PA0001[] IS NOT INITIAL.
SELECT PLANS PLSTX
INTO CORRESPONDING FIELDS OF TABLE IT_T528T
FROM T528T
FOR ALL ENTRIES IN IT_PA0001
WHERE PLANS = IT_PA0001-PLANS
AND SPRSL = 'EN'.
SELECT WERKS BTRTL BTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T001P
FROM T001P
FOR ALL ENTRIES IN IT_PA0001
WHERE WERKS = IT_PA0001-WERKS
AND BTRTL = IT_PA0001-BTRTL.
SELECT ORGEH ORGTX
INTO CORRESPONDING FIELDS OF TABLE IT_T527X
FROM T527X
FOR ALL ENTRIES IN IT_PA0001
WHERE ORGEH = IT_PA0001-ORGEH
AND SPRSL = 'EN'.
SELECT PERSK PTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T503T
FROM T503T
FOR ALL ENTRIES IN IT_PA0001
WHERE PERSK = IT_PA0001-PERSK
AND SPRSL = 'EN'.
ENDIF.
*DELETE ADJACENT DUPLICATES FROM IT_PA0001 COMPARING PERNR.
LOOP AT IT_PA0001.
MOVE IT_PA0001-ENAME TO IT_FINAL-ENAME.
READ TABLE IT_PA0002 WITH KEY PERNR = IT_PA0001-PERNR.
IF SY-SUBRC = 0.
MOVE IT_PA0002-PERNR TO IT_FINAL-PERNR.
ENDIF.
READ TABLE IT_T528T WITH KEY PLANS = IT_PA0001-PLANS.
IF SY-SUBRC = 0.
MOVE IT_T528T-PLSTX TO IT_FINAL-PLSTX.
ENDIF.
LOOP AT IT_T001P WHERE WERKS = IT_PA0001-WERKS AND BTRTL = IT_PA0001-BTRTL.
MOVE IT_T001P-BTEXT TO IT_FINAL-BTEXT.
ENDLOOP.
READ TABLE IT_T527X WITH KEY ORGEH = IT_PA0001-ORGEH.
IF SY-SUBRC = '0'.
MOVE IT_T527X-ORGTX TO IT_FINAL-ORGTX.
ENDIF.
READ TABLE IT_T503T WITH KEY PERSK = IT_PA0001-PERSK.
IF SY-SUBRC = '0'.
MOVE IT_T503T-PTEXT TO IT_FINAL-PTEXT.
ENDIF.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = IT_FINAL-PERNR
BUFFER
NO_AUTHORITY_CHECK = ' '
IMPORTING
MOLGA = WG_MOLGA
TABLES
IN_RGDIR = WI_RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2 .
CLEAR WG_SUM.
LOOP AT WI_RGDIR INTO ls_evp.
IF ( WI_RGDIR-FPEND BETWEEN P_STDATE AND P_ENDATE AND
WI_RGDIR-SRTZA = 'A' ) .
IF Wg_MOLGA = '10'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = 'IN'
EMPLOYEENUMBER = IT_FINAL-PERNR
SEQUENCENUMBER = ls_evp-SEQNR
READ_ONLY_INTERNATIONAL = ''
CHANGING
PAYROLL_RESULT = WI_PAYRESULT
EXCEPTIONS
ILLEGAL_ISOCODE_OR_CLUSTERID = 1
ERROR_GENERATING_IMPORT = 2
IMPORT_MISMATCH_ERROR = 3
SUBPOOL_DIR_FULL = 4
NO_READ_AUTHORITY = 5
NO_RECORD_FOUND = 6
VERSIONS_DO_NOT_MATCH = 7
ERROR_READING_ARCHIVE = 8
ERROR_READING_RELID = 9
OTHERS = 10.
endif.
ENDLOOP.
APPEND IT_FINAL.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_FINAL COMPARING ALL FIELDS.
ENDFORM. " GET_DATA
*& Form BUILD_FIELD_CATLOG
text
--> p1 text
<-- p2 text
FORM BUILD_FIELD_CATLOG .
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PERNR'.
FIELDCATALOG-SELTEXT_M = 'Emp Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 9.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ENAME'.
FIELDCATALOG-SELTEXT_M = 'Emp Name'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 40.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PLSTX'.
FIELDCATALOG-SELTEXT_M = 'Position'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 26.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'BTEXT'.
FIELDCATALOG-SELTEXT_M = 'Work Location'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 15.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ORGTX'.
FIELDCATALOG-SELTEXT_M = 'Dept. Description'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 25.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PTEXT'.
FIELDCATALOG-SELTEXT_M = 'Grade Set Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 21.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
ENDFORM. " BUILD_FIELD_CATLOG
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM DISPLAY_DATA .
REPID = SY-CPROG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = 'X'
IT_FIELDCAT = FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM. " DISPLAY_DATA -
Problem while using function module TRIP_EDIT_TEXT_IN_POPUP
Hii,
I am using a fm TRIP_EDIT_TEXT_IN_POPUP to display text editor where the user can write some comments.
This is my code
DATA: TEXTTAB TYPE TABLE OF TDLINE.
DATA: MOREI TYPE MOREI,
EDITOR_TYPE TYPE EDITOR_TYPE.
CALL FUNCTION 'TRIP_EDIT_TEXT_IN_POPUP'
EXPORTING
I_MOREI = MOREI
I_EDITOR_TYPE = EDITOR_TYPE
I_TITLE = 'Title'
I_MODUS = 'C'
TABLES
T_TAB_EDITOR = TEXTTAB
EXCEPTIONS
DEFAULT_TEXT_NOT_FOUND = 1
OTHERS = 2.
The problem is when I am passing a already filled table TEXTTAB (To display data when the screen comes up) It is not working. It is showing the blank editor even if the texttab table is filled.
Does anyone know how to display data using this FM ?you have to pass
I_EDITOR_TYPE
I_EDITOR_KEY
two values in exporting parameter and same value you have to populate in the table parameter.
T_TAB_EDITOR.
i.e.
T_TAB_EDITOR-EDITOR_TYPE should be equal to I_EDITOR_TYPE in exporting parameter and
T_TAB_EDITOR-EDITOR_KEY should be equal to I_EDITOR__KEY in exporting parameter.
Regards
Shiba Prasad Dutta -
Alv grid using function module
hi all,
i am using editable alv grid. but i need to add a functionality by adding a button on toolbar on click on button a new blank row should be appended below where user can enter the new records. please suggest on this i am using alv grid using function module.Hi
check this program
BCALV_TEST_GRID_EDITABLE
when u execute the program, there is an alv which displays a set of records.
where we have a option to add new row to the alv.check it.
Hope this helps you. -
Updating liveCache Data using Function Module or ABAP program.
Is it possible to update APO Live Cache using Function Module or ABAP Program.
Will the aggregation/disaggreagation remain the same if data is modified using Function Module or ABAP Program.
Regards,
Vikasello Vikas,
-> Please click at
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
& read about 'SAP liveCache'.
As you know objects stored in liveCache in the class containers can be accessed
and manipulated only via LCA routines which are methods of LCA objects.
The registration of the LCA routines is done automatically when
the liveCache is started by the LC10, check the lcinit.log file.
The shared procedures in the LiveCache are written in C++ and shipped
to the customers as binary shared libraries(LCA-Routines) < LCA build >
together with the LiveCache. The original C++ source code of the
libraries is not generally available to the customers.
The LCA routines could be called via "/SAPAPO/OM*" ABAP functions.
-> For SAP liveCache documentation in English:
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
< -> Database Administration in CCMS: SAP liveCache -> liveCache Assistant ->
liveCache: Monitoring -> Problem Analysis-> DB Procedures >
In transaction LC10 for the LCA connection choose liveCache:Monitoring
then go to Problem Analysis -> DB Procedures=>
The system displays an overview of all database procedures loaded into
liveCache, their input and output parameters, and other details.
-> Tr. /n/SAPAPO/OM16 ( in further releases /n/sapapo/om19 ) is provided by
SAP to get information about data stored in the LiveCache. If you would
like to get your own views, you should write a special report in ABAP using
"/SAPAPO/OM"-development class functionality.
-> There are standard function modules in ABAP available to extract/change data from/in liveCache.
-> In addition to the given information => find more information at:
SCM 4.0 -> http://help.sap.com/saphelp_scm40/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
SCM 4.1 ->
http://help.sap.com/saphelp_scm41/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
SCM 5.0 ->
http://help.sap.com/saphelp_scm50/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
You can go to the Advanced Planner and Optimizer documentation from the above links < Supply Network Planning Run -> Aggregated Planning -> SNP Disaggregation Or SNP aggregation . >.
If you still have open questions on the posted topic =>
Could you please give more information on your application scenario.
Thank you and best regards, Natalia Khlopina -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
ABAP code which will use function module during field mapping in LSMW
Hi,
During field mapping in LSMW, for one of the field called field, I want to use a function module 'QF05_RANDOM_INTEGER', which will generate random numbers and map that random number to that field.
How do I write ABAP code which uses function module, during filed mapping for a particluar field in LSMW ?
Please help...
Regards,
Tushar.Hi Tushar,
You can write in FORM ROUTINE and LSMW.
I hope you know how to write ABAP code at field level.
If not ...
Come to change mode->select the field->Rule->ABAP Code
write a perform statement in ABAP code at field level.
<b>PERFORM test</b> using val
changing valu.
Go to Utilities(at menu)->switch layout-> extras ->select Layout->check Form routine-> it will display a FORM Routine... at bottom
this is the place where you can write some code for
<b> FORM test</b> using value
changing value1
FM call....
.ENDFORM
Get the value1 returned and use for the Field population.
Reward points if this Helps.
Manish
Message was edited by:
Manish Kumar -
Problem when Saving Texts using Function Module CREATE_TEXT
Hi All,
I am using Function Module CREATE_TEXT to save text in transaction XK02.
But the first character of few lines disappears in one of (Ruled) editor while that character appears in a new line in another editor.
In debug mode, I found that value of TDFORMAT is '=' in the line in which first character disappears.
while in rest its value is '*'.
I tried hardcoding the value FFORMAT in function module CREATE_TEXT with '*'. Please suggest me solution to this.
Regards,
NibhaHI.
Refer this link.
http://www. ****************/Tutorials/ABAP/MaterialLongText/info.htm
Regards.
Jay -
Delta Problem while extracting the data by using function module
Hi Experts,
I have extracted the data by using Function module, for delta loads I have given Calday and additive delta in Generic delta settings, in BW side I have initialized the data after that I have given delta update option in infopackage and I made process chain also, every day process chain is running successfully but it is showing zero records, but there is a data in Data source (RSA3), means delta is not working.
What is the problem,
Is there any another settings for delta loads,
Please help me to do this,
Helpful answer will be appreciated with points,
Regards,
VenkatHi,
Try this delta type :NEW STATUS FOR CHANGED RECORDS.
More information from Nagesh, this information may help
1. New status for changed Records.
2. Additive delta.
New status for changed records means
New Order
order no quantity
1000 10
order changed to quntity 8. then 2 records will posted 2 BW in first case.
1000 -10
1000 8
if you come to Additve delta.
for the same case it will send the same record as
1000 10
changed records
1000 -2
this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
Additive delta we can use for ODS and Cubes with update mode Addition.
Regards,
Satya -
Problem in getting public holiday class using function module
Hi to all
I am using function module
HR_PERSON_READ_WORK_SCHEDULE.
for getting the employee's actual work schedule and public holiday class FTKLA.
But I am unable to get the correct public holiday class.
Please guide me.
How to do that.
Regards
AnubhavHi,
form build_work_schedule tables b_psp structure pdpsp
b_day_psp structure pdsppsp
b_employees structure pdpnr
using value(b_begda) like sy-datum
value(b_endda) like sy-datum
value(b_read_db) type c.
data: counter type i. "Note 495298
call function 'HR_PERSON_READ_WORK_SCHEDULE'
exporting
begin_date = b_begda
end_date = b_endda
grouping_dws = motpr "VEX Modif
grouping_attendence = moabw
grouping_substitute = mover
read_from_database = b_read_db
im_read_no_locked_records = 'X' "803380
tables
pernr_tab = b_employees
psp = b_psp
day_psp = b_day_psp
exceptions
error_in_build_psp = 1
others = 2.
read table b_employees with key error = 'X'
transporting pernr.
if sy-subrc eq 0.
read table d3000_pers with key pernr = b_employees-pernr
transporting name.
if sy-subrc eq 0.
message s582 with d3000_pers-name.
else.
message s582 with b_employees-pernr.
endif.
endif.
Hope it helps you. -
Error occurred while loading Generic extraction using Function module
Hi all
I'm trying to do INIT for Generic Extractor using Function module, but i'm getting error as "Error occurred in the source system"
Error message from the source system
Diagnosis
An error occurred in the source system.
System Response
Caller 09 contains an error message.
Further analysis:
The error occurred in Extractor .
Refer to the error message.
Procedure
How you remove the error depends on the error message.
Note
If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
Job terminated in source system --> Request set to red
Message no. RSM078
Can u help plz....Hi Vishnu
This are the Job log details i found in source system...Can u tell what whould be the problem?
Message
Job started
Step 001 started (program SBIE0001, variant &0000000002861, user ID
Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
DATASOURCE = ZYFI102
RLOGSYS =
REQUNR = REQU_D9Y4CZDQULRIHRRVU33KOLQZO
UPDMODE = D
LANGUAGES = *
Current Values for Selected Profile Parameters *
abap/heap_area_nondia......... 0 *
abap/heap_area_total.......... 10737418240 *
abap/heaplimit................ 40000000 *
zcsa/installed_languages...... DE *
zcsa/system_language.......... E *
ztta/max_memreq_MB............ 2047 *
ztta/roll_area................ 3000000 *
ztta/roll_extension........... 2000000000 *
No authorization for Acct type D
Job cancelled after system exception ERROR_MESSAGE
Thanks in advance
Edited by: MohanDP on Feb 25, 2011 11:58 AM
Edited by: MohanDP on Feb 25, 2011 12:01 PM -
How to Send Internal table to SAP Spool using Function Modules or Methods?
Hi Experts,
How to Send Internal table to SAP Spool using Function Modules or Methods?
Thanks ,
KiranThis is my code.
I still get the no ABAP list data for the spool, even tho I can see it sp01?
REPORT Z_MAIL_PAYSLIP.
* Declaration Part *
tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
infotypes: 0000, 0001, 0105, 0655.
data: begin of ITAB occurs 0,
MTEXT(25) type C,
PERNR like PA0001-PERNR,
ABKRS like PA0001-ABKRS,
ENAME like PA0001-ENAME,
USRID_LONG like PA0105-USRID_LONG,
end of ITAB.
data: W_BEGDA like HRPY_RGDIR-FPBEG,
W_ENDDA like HRPY_RGDIR-FPEND.
data: RETURN like BAPIRETURN1 occurs 0 with header line.
data: P_INFO like PC407,
P_FORM like PC408 occurs 0 with header line.
data: P_IDX type I,
MY_MONTH type T549Q-PABRP,
STR_MY_MONTH(2) type C,
MY_YEAR type T549Q-PABRJ,
STR_MY_YEAR(4) type C,
CRLF(2) type x value '0D0A'.
data: W_CMONTH(10) type C.
data: TAB_LINES type I,
ATT_TYPE like SOODK-OBJTP.
data: begin of P_INDEX occurs 0,
INDEX type I,
end of P_INDEX.
constants: begin of F__LTYPE, "type of line
CMD like PC408-LTYPE value '/:', "command
TXT like PC408-LTYPE value 's', "textline
end of F__LTYPE.
constants: begin of F__CMD, "commands
NEWPAGE like PC408-LINDA value '',
end of F__CMD.
data: P_LIST like ABAPLIST occurs 1 with header line.
*data: OBJBIN like SOLISTI1 occurs 10 with header line,
data: OBJBIN like LVC_S_1022 occurs 10 with header line,
DOCDATA like SODOCCHGI1,
OBJTXT like SOLISTI1 occurs 10 with header line,
OBJPACK like SOPCKLSTI1 occurs 1 with header line,
RECLIST like SOMLRECI1 occurs 1 with header line,
OBJHEAD like SOLISTI1 occurs 1 with header line,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_buffer type string,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname.
data: file_length type int4,
spool_id type rspoid,
line_cnt type i.
*-------------------------------------------------------------------* * INITIALIZATION *
OBJBIN = ' | '.
append OBJBIN.
OBJPACK-HEAD_START = 1.
data: S_ABKRS like PV000-ABKRS.
data: S_PABRP like T549Q-PABRP.
data: S_PABRJ like T549Q-PABRJ.
* SELECTION SCREEN *
selection-screen begin of block BL1.
parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
selection-screen end of block BL1.
START-OF-SELECTION.
s_ABKRS = PNPXABKR.
S_PABRP = PNPPABRP.
s_pabrj = PNPPABRJ.
w_begda = PN-BEGDA.
w_endda = PN-ENDDA.
get pernr.
* "Check active employees
rp-provide-from-last p0000 space pn-begda pn-endda.
CHECK P0000-STAT2 IN PNPSTAT2.
* "Check Payslip Mail flag
rp-provide-from-last p0655 space pn-begda pn-endda.
CHECK P0655-ESSONLY = 'X'.
rp-provide-from-last p0001 space pn-begda pn-endda.
* "Find email address
RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
if p0105-usrid_LONG ne ''.
ITAB-PERNR = P0001-PERNR.
ITAB-ABKRS = P0001-ABKRS.
ITAB-ENAME = P0001-ENAME.
ITAB-USRID_LONG = P0105-USRID_LONG.
append itab.
clear itab.
endif.
"SY-UCOMM ='ONLI'
END-OF-SELECTION.
*------------------------------------------------------------------* start-of-selection.
write : / 'Payroll Area : ', S_ABKRS.
write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
write : / 'System Time : ', SY-UZEIT.
write : / 'User Name : ', SY-UNAME.
write : / SY-ULINE.
sort ITAB by PERNR.
loop at ITAB.
clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
* Retrieve Payroll results sequence number for this run
select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
and FPBEG ge W_BEGDA
and FPEND le W_ENDDA
and SRTZA eq 'A'.
* Produce payslip for those payroll results
if SY-SUBRC = 0.
call function 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = ITAB-PERNR
SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
PAYSLIP_VARIANT = PAY_VAR
IMPORTING
RETURN = RETURN
P_INFO = P_INFO
TABLES
P_FORM = P_FORM.
check RETURN is initial.
* remove linetype from generated payslip
loop at p_form.
objbin = p_form-linda.
append objbin.
line_cnt = line_cnt + 1.
endloop.
file_length = line_cnt * 1022.
* create spool file of paylsip
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spool_id
TABLES
it_textdata = objbin.
IF sy-subrc EQ 0.
WRITE spool_id.
ENDIF.
DESCRIBE table objbin.
DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = spool_id
NO_DIALOG = ' '
DST_DEVICE = 'MAIL'
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT = l_no_of_bytes
* PDF_SPOOLID = l_pdf_spoolid
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
PDF = pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = pdf.
* Transfer the 132-long strings to 255-long strings
* LOOP AT pdf.
* TRANSLATE pdf USING ' ~'.
* CONCATENATE gd_buffer pdf INTO gd_buffer.
* ENDLOOP.
* TRANSLATE gd_buffer USING '~ '.
* DO.
* it_mess_att = gd_buffer.
* APPEND it_mess_att.
* SHIFT gd_buffer LEFT BY 255 PLACES.
* IF gd_buffer IS INITIAL.
* EXIT.
* ENDIF.
* ENDDO.
OBJHEAD = 'Objhead'.
append OBJHEAD.
* preparing email subject
concatenate W_ENDDA(6)
' Payslip-'
ITAB-ENAME+0(28)
ITAB-PERNR+4(4) ')'
into DOCDATA-OBJ_DESCR.
DOCDATA-OBJ_NAME = 'Pay Slip'.
DOCDATA-OBJ_LANGU = SY-LANGU.
OBJTXT = 'Pay Slip.'.
append OBJTXT.
*prepare email lines
OBJTXT = DOCDATA-OBJ_DESCR.
append OBJTXT.
OBJTXT = 'Please find enclosed your current payslip.'.
append OBJTXT.
* Write Attachment(Main)
* 3 has been fixed because OBJTXT has fix three lines
read table OBJTXT index 3.
* DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
clear OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 3.
OBJPACK-DOC_TYPE = 'RAW'.
append OBJPACK.
* Create Message Attachment
ATT_TYPE = 'PDF'.
describe table OBJBIN lines TAB_LINES.
read table OBJBIN index TAB_LINES.
* OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = ATT_TYPE.
OBJPACK-OBJ_NAME = 'ATTACHMENT'.
OBJPACK-OBJ_DESCR = 'Payslip'.
append OBJPACK.
* Create receiver list refresh RECLIST.
clear RECLIST.
RECLIST-RECEIVER = itab-USRID_long.
translate RECLIST-RECEIVER to lower case.
RECLIST-REC_TYPE = 'U'.
append RECLIST.
* Send the document
*SO_NEW_DOCUMENT_ATT_SEND_API1
call function 'SO_DOCUMENT_SEND_API1'
exporting
DOCUMENT_DATA = DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
tables
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = pdf
CONTENTS_TXT = OBJTXT
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
RECEIVERS = RECLIST
exceptions
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
others = 8.
if SY-SUBRC NE 0.
ITAB-MTEXT = 'Message Not Sent to : '.
else.
ITAB-MTEXT = 'Message Sent to : '.
endif.
* else.
* ITAB-MTEXT = 'Message Not Sent to : '.
* endif.
else.
"SY-SUBRC Not = 0
ITAB-MTEXT = 'Payroll data not found : '.
endif.
"end of SY-SUBRC = 0.
modify ITAB.
endloop. "end loop at ITAB
sort ITAB by MTEXT PERNR.
loop at ITAB.
at new MTEXT.
uline.
write : / ITAB-MTEXT color 4 intensified on.
write : / 'Emp. Code' color 2 intensified on,
12 'Emp. Name' color 2 intensified on,
54 'Email ID' color 2 intensified on.
endat.
write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
endloop. -
Error message when using function module HRIQ_TESTRESULTS_CREATE
Hi,
I need your help, I'm trying to use function module HRIQ_TESTRESULTS_CREATE to create external test results, I've used this function before without subscores, now I need to create subscores, but I get the message: "Grading scale UBID applies".
The test type EXAM_UB_ING has assigned the UBID academic scale, which has a range from 1 to 677. Test type EXAM_UB_ING has 3 subtests (grammar, listening and reading) which also have the UBID academic scale assigned.
I think this isn't a customizing problem because I can create test results with subscores using the PIQST00 transaction, the error message happens just when using the function module.
I'm using this import parameters:
STUDENT:
PL: 01
OT: ST
OBJID: Student ID
TESTRESULTS_HEADER:
ISSUEDATE 08.02.2010
VALIDDATE 30.04.2010
TEST_GUID
TESTEO 50000269
TRANSEO 00000000
TESTTYPE EXAM_UB_ING
SESSIONID T1
SESSIONYEAR 2010
ENTRYDATE 08.02.2010
TESTPASSFAIL
TESTTOTRES 458
TESTSCALE_ID
TOTALPERCENT1 0,00
TOTALPERCENT2 0,00
ENTRYMODE
SUBTY
Table TESTRESULTS_SUBSCORES:
SUBTESTID GRAMMAR
SUBTESTTRES GRAMMAR
SUBT 203
SUBTESTID READING
SUBTESTTRES READING
SUBT 120
Does anybody know which could be the error? Or any other function module which I can use? (with HRIQ_TESTRESULTS_PROCESS_DATA I get the same error message).
Thanks in advance!
AraceliAraceli,
I just noticed. You are populating SUBTESTSCALE_ID in subtest result structure.That's the reason it's throwing this error. it is trying to match Scale ID from test with value in sub test result scale ID.
Prabhat Singh
Maybe you are looking for
-
Alright, I'm brand new to CSS and to Dreamweaver so please be easy on me if this is a completely idiotic question . I have just started some code for a site I'm working on. I have it almost set up how I want it minus the bells and whistles. My onl
-
Hi I somehow d/l the extension mp3toolbar.com and I disabled it in the add ons section, however it has changed my default search engine from Google to mp3toolbar. I went into the about:config section and changed the keyword entry to google, but every
-
Hi , I would like to extract data from BW query and its output of should populate into the selection screen which is developed in Web Dynpro. Can anyone please calrify my dout Regards Chandrashekar
-
Premiere Pro CC and AVCHD spanning or Multicam problem
I'm not exactly sure where to pin the current problem I'm having. To my best guess it's either an AVCHD spanning issue, or it's just just a Multi-cam bug. Yesterday I cut a 40 minute multicam sequence. It looked and played great when I was finishe
-
Detect and install java runtime environment using javascript
hi, i'm a flash developer and i only use javascript to embed my movies in html, i've search the web and found some answers but i can't seem to understand it very well maybe because i don't have that much time to learn it. please if you have any scrip