07-08-2009 10:37 AM
Hi,
I am pretty new to this ISU field and i have been asked to code for a Long Text in EMIGALL for DEVICE LOCATION,
so i would like someone can help me with it.
thanks in advance.
Robert.
07-08-2009 5:29 PM
Hi Robert,
Almost the same question has already been asked here: . Is your question related to this? Can you shed some light on the technical field name (name of database tablen and field name) you want to populate?
Kind regards,
Fritz
07-08-2009 5:29 PM
Hi Robert,
Almost the same question has already been asked here: . Is your question related to this? Can you shed some light on the technical field name (name of database tablen and field name) you want to populate?
Kind regards,
Fritz
07-09-2009 7:12 AM
Hi Fred!!
Thank you for your response,well i have been assigned a object development where in i need to make sure that i can add the long text for the given device location.
As you might know that when we create a device through ES65 transaction, we have a functional location long text field which has has a editor,where you can write free text,so on similar pattern i need to have long text for the device location as you know there is a migration object for the short text as NOTE_DLC in EMIGALL , so do i have to create a new zlong_text migration object or something similar to that process.
if we have to create that new migration object what is the BAPI or the function module and in what way i can create the new migration object that would take care of the long text for the given Device location.
and i want to know is there any other way i can do that to create a long text for the device location.
or can we write some code in the emigall trx for the long text.
please suggest.
thank you in advance.
07-09-2009 6:23 PM
07-11-2009 9:45 AM
Robert wrote:
But i had some doubts like according to your notes it says to create use a existing BAPI but i was unable to find a BAPI for that particular transaction ES65(Create Device Location)as i could only find BAPI for that create funtional location,
so now do we have to create a new BAPI for that or is there other way to do that as you know i read your instruction on the thread of answers but i was a little confused that when i tried to create a migration object as ZLONG and add a BAPI it asks for a service module as i do not know what module to put in there, so i wanted to ask do we need to create a FM so that we can add it or a custom BAPI to make that work..
Robert,
Please see the ABAP code of the service function module I've added to the thread . Please implement the function module ZZMIG_SAVE_LONG_TEXT first and then use the same function module as the service function module for a new BAPI migration object. Please read chapter 3.4.2 of the :Initially, it was designed to allow a data migration with the IS Migration Workbench using BAPIs. However, this function allows the generation of migration objects based on any function module, which follows the design rules of a BAPI.
Robert, please create a new BAPI migration object using the given function module and try to create the long text of a device location.
Kind regards,
Fritz
07-11-2009 12:05 PM
Hi Fred,
well i created FM and i was trying out the fixed rule,
Field / Field rule
x_head-tdobject = 'IFLOT' fixed value
x_head-tdname = <ID of technical object> via KSM (e.g. DEVLOC)
x_head-tdid = 'LTXT' fixed value
x_head-tdspras = sy-langu fixed value
x_head-tdform = 'SYSTEM' fixed value
x_head-tdlinesize = 132 fixed value
xt_line_tab-tdformat = '*' fixed value
but when i was adding the fixed rule, it was asking for domain so what should be the Domain that i should add and what should i keep the fixed value, string or filed or abap rule.
Finally you need to adjust the RETURN-FIELD of the newly created BAPI migration object to AUTO-X_HEAD-TDNAME,
where do i make this adjustment can you specify that.
thank you so much for your support,
Robert.
07-11-2009 12:27 PM
Hi Fred,
Well i would also like to ask about the
x_head-tdname = <ID of technical object> via KSM (e.g. DEVLOC), where should i put the value and what exactly would it be can i put DEVLOC in the ID of technical Object and where should i put this value.
07-12-2009 11:20 AM
Robert,
You can find most of the answers to your questions in the Guidelines:
Chapter 2.4.2 describes how to configure the field rule Fixed Value.
Chapter 2.4.5 describes how to configure the field rule via KSM.
Chapter 2.5 descibes the Key- and Status Management and the usage of the the KSM in field rules.
The specific answer to your questions are:
(1) ...When i was adding the fixed rule, it was asking for domain so what should be the Domain that i should add ... You may ignore the domain field when creating a fixed value object. It's more for information purposes.
(2) ... and what should i keep the fixed value, string or filed or abap rule ... I'd suggest to use 'String' and enter the specific value in the field 'FV contents'.
(3) ... Finally you need to adjust the RETURN-FIELD of the newly created BAPI migration object to AUTO-X_HEAD-TDNAME, where do i make this adjustment can you specify that ... The return field can only be adjusted int the migration object maintenance screen (MigObject -> Change). Please see chapter 3.1 for more details on the 'return field' and figure 3-8 in chapter 3.4.2 how to generate a BAPI migration object.
(4) ... Well i would also like to ask about the x_head-tdname = via KSM (e.g. DEVLOC), where should i put the value ... You wanted to know how to migrate a long text of a device location migration object DEVLOC). According to chapter Chapter 2.4.5 you need to enter the name of the superior migration object (here DEVLOC) in the 'MigObject1'field on the 'via KSM' sub-screen on the field maintenance screen.
(5) ... and what exactly would it be can i put DEVLOC in the ID of technical Object and where should i put this value... I am not sure I understand your question. In the end you will need to pass the number (ID) of the technical object in the TDNAME field. Either you put the id into the import file (only if you know the id) or you need to use the 'via KSM' field rule to replace the legacy system key of the device location by the SAP key by the load report and prior to passing the auto data to the application thus your new function module.
Kind regards,
Fritz
07-15-2009 6:20 AM
Hi Fred,
Well i have been partially successful in creating a long text migration object but when i try to migrate the data it gives me an error stating that "The Higher-level object for 1456",device location,does not exist". my KSM key value was 1456 and in TDNAME I HAD PUT THE VALUE AS DEVICE LOCATION.
I wish to know that if i am doing something wrong while entering the details in the respective fields.
07-15-2009 6:25 AM
07-15-2009 6:29 AM
07-15-2009 8:38 AM
Robert,
You have two options:
(1) Migrate a device location first and configure the rule of the TDNAME field as 'via KSM'. In the import file you will need to transfer the legacy system of the device location you've created before with the same legacy system key. This is imho the standard migration scenario.
(2) The device location already exists in the SAP system and has been created e.g. manually (not by data migration). Consequently there exists no legacy system key of this device location in the KSM (migration specific reference table). In this scenario you need to set the field rule to 'Transfer' and transfer the correct SAP key of the device location in the import file.
Kind regards,
Fritz
07-15-2009 2:43 PM
Hi Fred,
Well i followed your instruction and now its giving me a short dump for i do not know why i have tried to follow the instruction and made those necessary changes as mentioned but it has is giving invalid length as a message in short dump.
07-15-2009 2:56 PM
Robert,
I followed my own instructions and my object works fine. Maybe somebody from the forum (maybe Ben?) can try to implement the described new migration object and give feedback?
Kind regards,
Fritz
07-17-2009 2:57 PM
Hi Fred,
well i did not make any headaway in the long text front,
well i am describing what i have done so that you can try to find out if there is
i am writing this to tell you what i did and what is giving me problem with my approach
please look and if you find any anomalities in it, i will be happy if you could correct me.
STEP 1:
created a function module and named it ZMIG_SAVE_LONG_TEXT
STEP 2:
Created a migration object LONG_TEXT
i) object data Tab:
service module :ZMIG_SAVE_LONG_TEXT
auto struc.type ZMIG_SAVE_LONG_AUTO
return structure BAPI_NEW_KEY
structure type : TEMKSV
return field: AUTO-X_HEAD-TDNAME
07-17-2009 3:07 PM
STEP 2:
Created a migration object LONG_TEXT
i) object data Tab:
service module :ZMIG_SAVE_LONG_TEXT
auto struc.type ZMIG_SAVE_LONG_AUTO
return structure BAPI_NEW_KEY
structure type : TEMKSV
return field: AUTO-X_HEAD-TDNAME
STEP 3:
sub-struc.name: X_HEAD
AutostrctName:SAPscript: Text Header
generation checkbox --checked
Max.Inputstr.ZMG_ZISU_LONG_TEXT_S001
Rec dat type DAT001
field name:
TDFORM
processing type 2:
fixed value
Fxd. val
fixed value: system
FV contents:SYSTEM
07-17-2009 3:13 PM
STEP 4:
sub-struc.Name:XT_LINE_TAB
autostrctName:Return Parameter
generation checkbox --checked
Max.Inputstr.ZMG_ZISU_LONG_TEXT_S002
Rec data type : TAB001
Multiple checkbox --checked
07-17-2009 3:21 PM
i have tried to implement all this but i get either higher level ksm key doesnot exist or
if i make a device location through ES 65 and enter that device location as a fixed value it gives me a short dump,
and i would need that 132 line of text line so that the long text can be migrated freely.
Regards,
Robert
07-20-2009 12:14 PM
Robert,
Did you create a BAPI migration object or did you create a migration object manually? What puzzles me is the name of the auto structure type ZMIG_SAVE_LONG_AUTO. I assume that you have copied the name wrongly from the screen and it is ZMG_ZISU_LONG_TEXT_AUTO. Please confirm.
What are the field rules of the XT_LINE_TAB structure? It could be TDFORMAT 2 Fixed value (e.g., *) and TDLINE 3 Transfer. Did you transfer a text in the TDLINE field?
You are writing that you have tried to implement all this but you get either higher level ksm key does not exist or if you enter the device location as a fixed value it gives me a short dump.
- If you have already migrated a device location it might be best using the Via KSM field rule and transfer the the oldkey of the device location.
- if you want to transfer the SAP key of the device location you need to set the field rule to Transfer and enter the number of the device location with leading zeros (30 char field).
What is the reason of the short dump?
Kind regards,
Fritz
07-20-2009 3:33 PM
thanks for your support Fritz,
i have been successful to upload the long text.
well the problem was in the sy-subrc <> 0 which was sy-subrc = 0 in service module which was causing the error.
so thank you for your valuable input.
Regards,
Robert
07-20-2009 4:05 PM
Robert,
It seems there some characters have gone lost: the characters 'greater than' and 'less than' are interpreted as 'code text' and therefore have not been displayed). The correct coding is indeed:
FUNCTION zzmig_save_long_text.
*"----------------------------------------------------------------------
""Interface local:
*" IMPORTING
*" REFERENCE(X_HEAD) TYPE THEAD
*" EXPORTING
*" REFERENCE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" XT_LINE_TAB STRUCTURE TLINE
*"----------------------------------------------------------------------
* save long text of an technical object
CLEAR return.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = x_head
savemode_direct = 'X'
TABLES
lines = xt_line_tab
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc ne 0.
* return error message
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = sy-msgty
cl = sy-msgid
number = sy-msgno
par1 = sy-msgv1
par2 = sy-msgv2
par3 = sy-msgv3
par4 = sy-msgv4
IMPORTING
return = return.
ENDIF.
ENDFUNCTION.
Please confirm that this coding is correct. May I assume that your problem has been solved now?
Thanks,
Fritz