‎2005 Mar 11 11:14 PM
Hi,
Im trying to write a BDC for the PR05 transaction (create trip data). The screen has a 'Comments' tab that does not get recorded while executing the SHDB transaction.
I used the class C_TEXTEDIT_CONTROL to set the data from the comments tab into the R/3 table PCL1. The code looks like this -
CONSTANTS: TEXT_LINE_LENGTH TYPE I VALUE 72.
DATA: TEXT_EDITOR TYPE REF TO C_TEXTEDIT_CONTROL.
DATA: TEXT_REPID LIKE SY-REPID value 'SAPMP56T'.
DATA: TEXT_CONTAINER(30) TYPE C VALUE 'EDITOR_TEXT'.
DATA: TEXT_CONTROL_DYNNR LIKE SY-DYNNR VALUE '1315'.
DATA : I_LINEITEM1 LIKE PTP71 OCCURS 3.
DATA : wa_lineitem LIKE PTP71.
move 'test comments' to wa_lineitem-EDITOR_TEXT.
append wa_lineitem to i_lineitem1.
CREATE OBJECT TEXT_EDITOR
EXPORTING
REPID = TEXT_REPID
DYNNR = TEXT_CONTROL_DYNNR
DYNPRO_CONTAINER = TEXT_CONTAINER
WORDWRAP_MODE =
C_TEXTEDIT_CONTROL=>WORDWRAP_AT_FIXED_POSITION
WORDWRAP_POSITION = TEXT_LINE_LENGTH
WORDWRAP_TO_LINEBREAK_MODE =
C_TEXTEDIT_CONTROL=>TRUE.
EXCEPTIONS
OTHERS = 1.
CH_SUBRC = SY-SUBRC.
call method text_editor->set_text_as_r3table
exporting
table = I_LINEITEM1
exceptions
others = 1.
On executing the BDC, data is added to the PCL1 table, however, when I see the trip data through PR05 transaction, the comments tab is empty.
I think there is something wrong with the parameters I am passing for the constructor of the TEXT_EDITOR object but I'm unable to figure it out.
Would appreciate any ideas on how to go about this.
Regards,
Rohini
‎2005 Mar 12 12:15 AM
I think what you are learning is that BDC does NOT support controls like the textedit control. Controls are supported at the frontend, for example, the GUI running on a PC, and because they require the GUI frontend to execute, they are not supported in BDC.
Your best bet is to try an find a BAPI to meet your needs. You can use tran BAPI to search for an appropriate BAPI or maybe another SDNer can post which BAPI to use.
Let us know how it goes.
‎2005 Mar 12 9:24 AM
Hi,
See if you can get access to eCATT. Use it to create a recording. It supports BDC for controls installed in user desktop.
Regards
‎2005 Mar 12 8:38 PM
Yes ECATT supports the Controls but executing an ECATT script requires a GUI frontend. That implies a user invoking the script. If you can live with that, go for it.
ECATT is available in 4.7 and can be installed in 4.6C via a support package. You can access it via tran SECATT.
‎2005 Mar 21 4:20 PM
Hello,
eCATT requires Web AS 6.20 upwards as a server system.
It can test function modules and TCD down to release 4.6C.
In that sense, you cannot "install" eCATT on a 4.6C system; eCATT connects to a 4.6C system via RFC.
Regards,
Marc