‎2007 Mar 24 11:43 PM
Hi Friends please help me with the below
1. Requirement : to Populate The system Date , Source System
in BI for Each load request.
1 Solution: I thought of writing the Start Routine for this but it is giving me error
syntax Error: END METHOD MISSING?????
2. Also I have requirement to populate 0sourcsys source system id, can any body help how to populate that.
Thanks
Poonam Roy
ABAP Code.
I have the End Method. what more to do.
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE tys_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
$$ begin of routine - insert your code only below this line -
... "insert your code here
FORM STARTROUTINE
USING G_S_MINFO TYPE RSSM_S_MINFO
CHANGING DATAPAK type TRANSTRU
ABORT LIKE SY-SUBRC.
DATA: ZLOAD_DAT LIKE SY-DATUM
ZZSOURSYS TYPE RSLOGSYS
IF G_S_MINFO-DATAPAKID=1
SOURCE_FIELDS-ZLOAD_DAT = SY-DATE.
SOURCE_FIELDS-ZZSOURSYS = G_S_MINFO-LOGSYS.
ENDIF.
ABORT = 0.
ENDFORM.
ENDMETHOD.
ENDCLASS.
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
raise exception type CX_RSROUT_ABORT.
$$ end of routine - insert your code only before this line -
ENDMETHOD.
‎2007 Mar 25 4:49 PM
You have to write the code (<b>in BI/BW</b>) in the transfer rule (<b>between Datasource transfer structure and infosource/info object</b>)
There the FORM begin with
[code]USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OIPERSON
G_T_ERRORLOG TYPE rssm_t_errorlog_int
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. set ABORT <> 0 to cancel datapackag[/code]
GS_MIN_INFO structure RSSM_S_MINFO contains information on the request being processed.
<i>G_S_MINFO. This passes technical information about the data load request,
such as requesting user, request date and time, update mode, the handling of
duplicate records, error handling flags, parallel processing flags, and what data
targets to update.</i>
If tou want to use start-routine for optimization reasons and fill an empty field in transfer structure, the structure G_S_MINFO is available too.
[code]USING G_S_MINFO TYPE RSSM_S_MINFO
CHANGING DATAPAK type TAB_TRANSTRU
G_T_ERRORLOG TYPE rssm_t_errorlog_int
ABORT LIKE SY-SUBRC. set ABORT <> 0 to cancel datapackage[/code]
And stay in FORM between limits :
[code]$$ begin of routine
$$ end of routine[/code]
Update RESULT in first case, and field(s) of DATAPAK in second case.
[code]RESULT = G_S_MINFO-LOGSYS.[/code] or
[code]LOOP AT DATAPAK INTO l_s_datapak_line.
l_s_datapak_line-zzsourcsys = G_S_MINFO-LOGSYS.
MODIFY DATAPAK FROM l_s_datapak_line.
ENDLOOP.[/code]
Regards
‎2007 Mar 25 12:17 AM
Just fill Infoobject with routine in transfer rules. This will leave Datasource and Stransfer structure unchanged.
Fill return with sy-datum/sy-datlo, G_S_MINFO-LOGSYS.
For source ID, use following FM
CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'
EXPORTING
i_source_system = G_S_MINFO-LOGSYS
IMPORTING
e_soursysid = RESULT
EXCEPTIONS
id_not_found = 1.Regards
‎2007 Mar 25 12:33 AM
Thanks A million for the response. i got success with system date in transformation but please correct my source system id code. it is giving me error
my BI object name is ZZSOURSYS.
Where should i put the code in routine transformation for ZZSOURSYS or in data soource enhancement in cmod where. please help
i got this error in routine transformation
Error: E:Field "G_S_MINFO-LOGSYS" is unknown, it niether one of the data statement so when i use data it gives error saying characters like - 0 not allowed
Thanks
Poonam
Please help
DATA: G_S_MINFO-LOGSYS.
CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'
EXPORTING
i_source_system = G_S_MINFO-LOGSYS.
IMPORTING
e_soursysid = RESULT.
EXCEPTIONS
id_not_found = 1.
null
‎2007 Mar 25 12:17 PM
‎2007 Mar 25 4:27 PM
Requirement is to have the sourcesystem id's. I have assigned the source system id's to logical source system in rsa1 but still it is giving me same error that G_S_MINFO NOT defined so to resolve that i changed the code as below
But Now it is giving me dump error during loading but no syntax error.
please help me
thanks
Poonam
<b>Abap Code in routine one to one .</b>
TYPE-POOLS: RSSM.
Data: G_S_MINFO TYPE RSSM_S_MINFO.
CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'
EXPORTING
i_source_system = G_S_MINFO-LOGSYS
IMPORTING
e_soursysid = RESULT
EXCEPTIONS
id_not_found = 1.
‎2007 Mar 25 4:49 PM
You have to write the code (<b>in BI/BW</b>) in the transfer rule (<b>between Datasource transfer structure and infosource/info object</b>)
There the FORM begin with
[code]USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BI0/OIPERSON
G_T_ERRORLOG TYPE rssm_t_errorlog_int
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. set ABORT <> 0 to cancel datapackag[/code]
GS_MIN_INFO structure RSSM_S_MINFO contains information on the request being processed.
<i>G_S_MINFO. This passes technical information about the data load request,
such as requesting user, request date and time, update mode, the handling of
duplicate records, error handling flags, parallel processing flags, and what data
targets to update.</i>
If tou want to use start-routine for optimization reasons and fill an empty field in transfer structure, the structure G_S_MINFO is available too.
[code]USING G_S_MINFO TYPE RSSM_S_MINFO
CHANGING DATAPAK type TAB_TRANSTRU
G_T_ERRORLOG TYPE rssm_t_errorlog_int
ABORT LIKE SY-SUBRC. set ABORT <> 0 to cancel datapackage[/code]
And stay in FORM between limits :
[code]$$ begin of routine
$$ end of routine[/code]
Update RESULT in first case, and field(s) of DATAPAK in second case.
[code]RESULT = G_S_MINFO-LOGSYS.[/code] or
[code]LOOP AT DATAPAK INTO l_s_datapak_line.
l_s_datapak_line-zzsourcsys = G_S_MINFO-LOGSYS.
MODIFY DATAPAK FROM l_s_datapak_line.
ENDLOOP.[/code]
Regards
‎2007 Mar 25 5:17 PM
‎2007 Mar 25 5:51 PM
Hi Raymond , please help me, i am writing the code in one to one mapping in transformation routine in BI 7,0 right click on zzsourcsys and go tp rule details
then can you modify my code and i can use that .
TYPE-POOLS: RSSM.
Data: G_S_MINFO TYPE RSSM_S_MINFO.
CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'
EXPORTING
i_source_system = G_S_MINFO-LOGSYS
IMPORTING
e_soursysid = RESULT
EXCEPTIONS
id_not_found = 1.
if i write your code in start routine it gives me error saying end method missing
thanks
Poonam
‎2007 Mar 25 8:15 PM
Hi Raymond, so kind of you,
please help me, i have written the code in one to one mapping in transformation routine in BI 7,0 right click on zzsourcsys and go tp rule details. No syntax errors in the code but when i load there is no value populating to zzsourcsys . i have defined zzsourcsys as 12 char. can u suggest where it is going wrong, i checked in tools assignment of sourcesystem id is there in my system.
Abap Code
TYPE-POOLS: RSSM.
Data: G_S_MINFO TYPE RSSM_S_MINFO.
RESULT = G_S_MINFO-LOGSYS.
Thanks
Poonam Roy
‎2014 Mar 24 8:06 PM
Hi Raymond,
I know you answered this a long time ago and it pertains to the mostly obsolete 3.x transfers, but just wanted to say 'thanks' anyways.
I really liked your explanations - I learned something I didn't know before so will certainly be able to leverage the new knowledge for other types of routines!
Best Regards,
Darryl
‎2007 Jun 06 1:54 PM
Hi Poonam Roy,
I am also facing same routine problem. I hope u would have solved this problem.
Please send routine code to my mail id.
Your help is appreciated.
my id is: chandu2k@gmail.com
Thanks & Regards,
Chandu
‎2008 Mar 11 2:49 PM
Isn't this module function (RSDG_ID_GET_FROM_LOGSYS) to be used to retreive ID from system source name ?
from the table rssoursystem, as in RSA1/assignement of source system id ?
it doesn't seem to retreive the current system source name during an extraction...
but i can be wrong....