Hello, everybody, who know how to use the function READ_TEXT
Hello , everybody, I came across a program in which there is a function READ_TEXT, what is it used for ? please specify the parameters id object
. Thank you in advance, mate.
Best regards
Frank
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0207'
language = sy-langu
name = tmp_name
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
lines = text_itab
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8
Refer this link:
http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db764494511d182b70000e829fbfe/frameset.htm
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
Raja T
Similar Messages
-
Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help
Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.
-
I think the class in the packet will be useful.
But I don't konw how to use it.
Do you get me a example.
Thanks.Hi,
Issue has been resolved. I used the value of the element to determine to display it or not.
Regards,
Swapnil K. -
Hello anyone know how to use the locked iphone outside USA
hello anyone know how to use the locked AT&T iphone 5 outside US. I'll go to Japan. Don't know if the phone can be used there.any idea will be appreciated.
You'll need to get it unlocked by ATandT to avoid paying huge roaming costs.
See: http://www.att.com/esupport/article.jsp?sid=KB414532&cv=820 -
I am a teacher and would like to know how to use the iPad in the classroom?
I am a teacher and would like to know how to use the iPad in the classroom?
Since this is a user forum you might wish to do some Google searching on your topic. There are hundreds of ways an iPad could be used in the classroom both by teachers and students. Apple is very much involved in education so you may wish to look further into their programs, but that is not done on the forums but through Apple's website. For example, Students - Mac, iPod, iPhone, and iPad for college and Education - iPod touch and iPhone enable on-the-go and Education - iPad makes the perfect learning ...
-
i have a problem with mail. the spelling and grammer check box before sending the messege is no longer there. I did everything but cannot get it back. is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
Also the mail is acting very funny by not getting the rules work in a proper method. Is ther a software to repair mail.i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check.
This problem just started for about 3 to 4 days now. earlier it was working normally. -
Gantt chart: Don't know how to use the tooltipkeys and toolkeylabel
I have a problem. Don't know how to use the tooltipkeys and toolkeylabel. I used jquery to select the gantt bars and on mouse over i was getting the task id "tid" then passing it to adf bean with serverlistener and showing a popup that is adf component with javascript. For positioning of the popup I used a button that has width and height 0 and has position absolute and gets the coordinates of the mouse.
"div[et]" is a jquery selector that selects all the elements that have attribute et. I noticed that all the bars have that attribute as a few other attributes as well "part"...
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
<af:document title="untitled1.jsf" id="d1">
<af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"/>
<af:resource type="javascript" source="resources/js/home.js"/>
<af:messages id="m1"/>
<af:form id="f1">
<af:commandButton text="commandButton 1" id="cb1" inlineStyle="visibility:hidden; width:0; height:0" />
<af:popup id="noteWindow" contentDelivery="lazyUncached" binding="#{homeBean.popup}">
<af:noteWindow id="popupWindow">
<af:panelFormLayout id="pfl2">
<af:panelLabelAndMessage label="Task id" id="plam5">
<af:outputText value="#{homeBean.taskId1}" id="ot64"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Start Location Name" id="plam6">
<af:outputText value="#{homeBean.startLocation}" id="ot7"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Stop Location Name" id="plam7">
<af:outputText value="#{homeBean.stopLocation}" id="ot8"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="tasktype" id="pla2m7">
<af:outputText value="#{homeBean.taskType}" id="ot9"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</af:noteWindow>
</af:popup>
<af:serverListener type="jsServerListener" method="#{homeBean.serverEventHandler}"/>
<dvt:schedulingGantt id="gantt1" value="#{bindings.PersonView1.schedulingGanttModel}" var="row"
startTime="2011-07-04 00:00:00" endTime="2011-07-04 23:00:00" summary="gsg"
showMenuBar="false" showToolbar="false" iconPlacement="left"
showTasksAsDailyBar="false">
<f:facet name="major">
<dvt:timeAxis scale="days" id="ta1"/>
</f:facet>
<f:facet name="minor">
<dvt:timeAxis scale="hours" id="ta2"/>
</f:facet>
<f:facet name="nodeStamp">
<af:column sortProperty="#{bindings.PersonView1.hints.PersonId.name}" sortable="false"
headerText="#{bindings.PersonView1.hints.PersonId.label}" id="c1">
<af:outputText value="#{row.PersonId}" id="ot1">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.PersonView1.hints.PersonId.format}"/>
</af:outputText>
</af:column>
</f:facet>
</dvt:schedulingGantt>
</af:form>
</af:document>
</f:view>javascript:
$(document).ready(bindEvents());
function bindEvents() {
$("div[et]").live('mouseover', function (e) {
$('#cb1').css("position", 'absolute');
$('#cb1').css("top", e.pageY-4);
$('#cb1').css("left", e.pageX);
var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
var element = AdfPage.PAGE.findComponent("f1");
var taskIdToPass = null;
if ($(this).attr("tid") !=undefined) {
taskIdToPass = $(this).attr('tid').toString();
} else {
taskIdToPass = $(this).parent().attr('tid').toString();
var param = { taskId : taskIdToPass };
AdfCustomEvent.queue(element, "jsServerListener", param, true);
if (!popup.isPopupVisible()) {
var hints = {};
hints[AdfRichPopup.HINT_LAUNCH_ID] = "cb1";
hints[AdfRichPopup.HINT_ALIGN_ID] = "cb1";
hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
popup.show(hints);
}).live("mouseout", function () {
var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
popup.hide();
};My bean that is session bean:
package view;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.render.ClientEvent;
import oracle.jbo.ApplicationModule;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import oracle.jbo.ViewObject;
public class HomeBean {
private RichPopup popup;
private String taskId1;
private String startLocation;
private String stopLocation;
private long taskId;
private String taskType;
public HomeBean() {
super();
public void serverEventHandler(ClientEvent clientEvent) {
String taskIdString = clientEvent.getParameters().get("taskId").toString();
this.taskId = Long.parseLong(taskIdString);
DCDataControl dc1 = BindingContext.getCurrent().findDataControl("AppModuleDataControl");
ApplicationModule am = dc1.getApplicationModule();
ViewObject vo = am.findViewObject("PdTrfDayView1");
RowSetIterator rowSetIterator = vo.createRowSetIterator(null);
Row[] rows = rowSetIterator.findByKey(new Key(new Object[] {taskId}), 1);
Row row = rows[0];
this.taskId1 = row.getAttribute("PdTrfDayId").toString();
this.startLocation = row.getAttribute("StartLocation").toString();
this.stopLocation = row.getAttribute("StopLocation").toString();
this.taskType = row.getAttribute ("PdTrfTypeId").toString();
RichPopup.PopupHints ph = new RichPopup.PopupHints();
vo.closeRowSetIterator();
public long getTaskId() {
return taskId;
public void setPopup(RichPopup popup) {
this.popup = popup;
public RichPopup getPopup() {
return popup;
public String getTaskId1() {
return taskId1;
public String getStartLocation() {
return startLocation;
public String getStopLocation() {
return stopLocation;
public String getTaskType() {
return taskType;
}I am wondering If i can use setCurrentRow on the iterator that i create and use it for displaying on the popup instead of binding startLocation and stopLocation to the bean and if there is any benefit of that at all...
Edited by: 897833 on Nov 24, 2011 11:37 AMHi,
To use tooltipkeys and tooltiplabel in gantt, you can add following code in managed bean
public String[] getTooltipKeys()
return new String[]{"columnA", "columnB", "StartDate", "EndDate"};
public String[] getTooltipLabels()
return new String[]{"A", "B", "Start Date", "End Date"};
where , the string array in the ToolTipKeys represents the columns, of the table you have in the gantt component , and the string array in TooltipLabels displays the label you want to display for the table columns.
In the jsff, you could call the bean methods as follows:
tooltipKeys="#{GanttBean.tooltipKeys}"
tooltipKeyLabels="#{GanttBean.tooltipLabels}" -
i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me
Step by step:
1. On your main vi Front Panel, create your boolean indicator.
2. On the block diagram, right click the new boolean indicator and select Create - Reference.
3. On sub-vi front panel, create boolean indicator (or use one that is already created).
4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
7. Wire the BoolRefnum to the reference input of the property node.
8.
Right click on the property node and select Change to All Write.
9. Move mouse to point to Visible inside property node box, left click and select Value.
10. Wire the boolean indicator from step 3 to the Value input of the property node.
11. On sub-vi front panel, right click on icon and select Show Connector.
12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
14. Save and run.
Here are the modified vi's.
- tbob
Inventor of the WORM Global
Attachments:
Pass_a_Reference.vi 20 KB
GL_Flicker_mod.vi 83 KB -
I lost my mini iPad in Peru, Machu Pichu area and I do not know how to use the find my iPad ... can you help???? please, before the person that found it unblock and use it
Did you enable the "Find my..." function BEFORE you lost it?
-
How to use the Function module 'BAPI_APPRAISAL_GETDETAIL'
hello friends,
I have to create the report which displays appraisee name, appraiser name,reviewer name and result.Using BAPI_APPRAISAL_GETDETAIL we can get the above all.But i don't know how to use the above function module.If anyone have used in their program could you please send me or anyone have idea how to do that Please help.It is very Urgent Help me.
Thanks in advance,
Regards,
Ashok.Hi,
I do not hae the code but i can tell you how you use the FM and get the required data, please follow the below mentioned steps:
1) In this Bapi you need to pass the Plan verison and Object Id data in the BAPI Import parameters and while passing the these values need to decalra the data variables same (of use the same reference fields as they are in Bapi import fields)as they are Bapi importing data fields.
2) decalre the Internal Table structure as they are in the Export and Table parameters.
3) Assign the decalred Import and Tables structures to the BAPI FM.
4) once the Bapi is run with the Import parameters data the Apprisal data and Apprisee data will returened in the import and table structures and also return value wll be imported.
5) now using the Structures which are in Import and Table decalrations in the FM you can retrieve the data by reading them.
Do let me know if you need any more details in this regard.
Raghotham Reddy.
If you find this is the right solution then allocate reward point. -
How to use the function MATERIAL_SAVE_CONFIGURATION
I try to create a new material configuration with the function MATERIAL_SAVE_CONFIGURATION. That doesnt work as I would: The link with the configurable material has been done (MARA-SATNR is filled ) but we don't have any configuration (MARA-CUOBF is empty).
The parameters (the 4 structures wuth caracteristics values ) has been filled with the function CUXM_GET_CONFIGURATION and seem to be OK.
I'm wondering why the new configuration is not saved...
If i try to change an existing configuration, that doesnt work too...
Do u know how to use that function?
Thanks in advance for your helphi,
for creation of class you can use BAPI_OBJCL_CREATE bapi,
parameters need to
OBJECTKEYNEW = material
OBJECTTABLENEW = 'MARA'
CLASSNUMNEW = class
this is not self commite bapi so u need to call BAPI BapiService.TransactionCommit afterwards.
i think this may solve your problem else mail me to [email protected]
i will send full code.
regards,
saleem. -
How to use the function module 'HR_ES_FEATURE_BACKFIELD'
Hi,
How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
I need the usage from both technical as well as functional point of view.
What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.hey iam from functional side can u be little bit clear of that feature
thanks
sikindar -
How to use the function module ....
hi
how to use the function module ssf_function_module_name in smartformsHi..
If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
Check this link.I am expalining here how to use this function module.
https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
<b>Reward points if useful</b>
Regards
Ashu -
How to use the function module /IRM/IPBB_AGREEMENT_CREATE.
Hi all,
Please help me how to use the function module /IRM/IPBB_AGREEMENT_CREATE.
It is a Vistex fuction module which is used to create Sales contract in SAP-Vistex. If anyone has use the function module and do have the sample code please share it.
Thanks.FORM create_agreement TABLES pt_agreement
CHANGING po_agreement .
CONSTANTS: c_strt_knumh TYPE knumh VALUE '0000000000'.
DATA: lc_kona TYPE /irm/s_gkona,
lc_cbasp TYPE /irm/s_ipcbasp,
lt_cbapr TYPE /irm/t_ipcbapr, "Partners
lc_cbapr TYPE /irm/s_ipcbapr,
lt_cbadt TYPE /irm/t_ipcbadt, "Dates
lc_cbadt TYPE /irm/s_ipcbadt,
lt_cbafs TYPE /irm/t_ipcbafs,
lc_cbafs TYPE /irm/s_ipcbafs,
lt_cbacn TYPE /irm/t_ipcbacn,
lc_cbacn TYPE /irm/s_ipcbacn,
lt_cbacl TYPE /irm/t_ipcbacl,
lc_cbacl TYPE /irm/s_ipcbacl,
lt_cbtpv TYPE /irm/t_ipagtpv,
lc_cbtpv TYPE /irm/s_ipagtpv,
lt_texts TYPE text_lh,
lc_texts TYPE itclh,
lt_cbasd TYPE /irm/t_ipcbasd,
lc_cbasd TYPE /irm/s_ipcbasd,
lc_agreement TYPE /irm/s_ipcbasp_doc,
lc_e_log_number TYPE balognr,
lt_messages TYPE /irm/t_gprolog.
DATA: lt_vake TYPE cond_vakevb_t,
lc_vake TYPE LINE OF cond_vakevb_t,
lt_konh TYPE /irm/t_gkonh,
lc_konh TYPE LINE OF /irm/t_gkonh,
lt_konp TYPE /irm/t_gkonp,
lc_konp TYPE LINE OF /irm/t_gkonp,
lt_konw TYPE /irm/t_gkonwu,
lc_konw TYPE LINE OF /irm/t_gkonwu,
lt_konm TYPE /irm/t_gkonmu,
lc_konm TYPE LINE OF /irm/t_gkonmu,
lt_komg TYPE /irm/t_gkomg_index,
lc_komg TYPE LINE OF /irm/t_gkomg_index,
lt_user_data TYPE /irm/t_gpraxfu_index,
lc_user_data TYPE LINE OF /irm/t_gpraxfu_index.
DATA: lc_updt(1) TYPE c.
DATA: lc_knumh TYPE knumh.
DATA: BEGIN OF lc_str_knumh,
hd(2) TYPE c VALUE '$$',
inc_num(8) TYPE c,
END OF lc_str_knumh.
DATA: blank_agree_key TYPE knuma VALUE '~~~~~~~~~~'.
FIELD-SYMBOLS <konh_line> LIKE LINE OF lt_konh.
FIELD-SYMBOLS <konp_line> LIKE LINE OF lt_konp.
DATA: lc_rule TYPE type_key_rule.
READ TABLE pt_agreement INTO lc_rule INDEX 1.
SELECT SINGLE * FROM kona
WHERE vkorg = lc_rule-vkorg
AND vtweg = '10'
AND spart = '10'
AND boart = 'ZPS1'
AND botext = lc_rule-sap_agkey.
IF sy-subrc = 0.
lc_updt = 'U'.
ELSE.
lc_updt = 'I'.
ENDIF.
LOOP AT pt_agreement INTO lc_rule.
MOVE sy-tabix TO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
WHILE lc_str_knumh-inc_num+7(1) = ' '.
CONCATENATE '0' lc_str_knumh-inc_num INTO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
ENDWHILE.
CONCATENATE '$$' lc_knumh INTO lc_knumh.
MOVE lc_str_knumh TO lc_knumh.
MOVE c_strt_knumh TO lc_knumh.
CLEAR: lc_konh, lc_konp, lc_komg.
MOVE: lc_rule-vkorg TO lc_komg-komg-vkorg,
'10' TO lc_komg-komg-vtweg,
'10' TO lc_komg-komg-spart,
p_waers TO lc_komg-komg-waerk,
'1300' TO lc_komg-komg-bukrs,
lc_rule-lifnr TO lc_komg-komg-lifnr,
lc_knumh TO lc_komg-knumh,
lc_knumh TO lc_konh-knumh,
lc_knumh TO lc_konp-knumh,
lc_rule-datab TO lc_konh-datab,
lc_rule-datbi TO lc_konh-datbi.
CASE lc_rule-tablnam.
WHEN 'A701'. "Every Agreement will have a A701 rule -
"Therefore we acn setup the header using A701
MOVE: 'New ' TO lc_kona-knuma,
lc_rule-vkorg TO lc_kona-vkorg,
'10' TO lc_kona-vtweg,
'10' TO lc_kona-spart,
'ZPS1' TO lc_kona-boart,
'C' TO lc_kona-abtyp,
'V' TO lc_kona-kappl,
p_waers TO lc_kona-waers,
lc_rule-knuma_ag TO lc_kona-abrex,
'ZPS2' TO lc_kona-kobog,
lc_rule-datab TO lc_kona-datab,
lc_rule-datbi TO lc_kona-datbi,
lc_rule-sap_agkey TO lc_kona-botext,
'1300' TO lc_kona-bukrs,
'I' TO lc_kona-updkz.
MOVE: 'New ' TO lc_cbasp-knuma_ag,
'ZPS1' TO lc_cbasp-boart_ag,
p_waers TO lc_cbasp-waers,
'A' TO lc_cbasp-setl_mth,
'B' TO lc_cbasp-setl_typ,
'A2' TO lc_cbasp-ident,
'E' TO lc_cbasp-setlm,
'ZPDA' TO lc_cbasp-pargr,
'X' TO lc_cbasp-npric,
'LF' TO lc_cbasp-stprl,
lc_rule-lifnr TO lc_cbasp-stpar,
lc_rule-contract_rev TO lc_cbasp-rvnum,
'I' TO lc_cbasp-updkz.
CONCATENATE: blank_agree_key
lc_rule-lifnr INTO lc_konh-vakey.
MOVE: lc_rule-lifnr TO lc_konp-lifnr.
WHEN 'A703'.
CONCATENATE: blank_agree_key
lc_rule-kunnr INTO lc_konh-vakey.
MOVE lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A709'.
CONCATENATE: blank_agree_key
lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_konh-vakey.
CONCATENATE: lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_komg-komg-prodh.
WHEN 'A710'.
CONCATENATE: blank_agree_key
lc_rule-matkl INTO lc_konh-vakey.
MOVE lc_rule-matkl TO lc_komg-komg-matkl.
WHEN 'A711'.
CONCATENATE: blank_agree_key
lc_rule-matnr INTO lc_konh-vakey.
MOVE lc_rule-matnr TO lc_komg-komg-matnr.
IF lc_rule-kschl = 'ZPPL'.
MOVE: 'C' TO lc_konp-krech,
'CAD' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-net_po_price * 1.
ENDIF.
WHEN 'A717'.
WHEN 'A718'.
CONCATENATE: blank_agree_key
lc_rule-zzextwg INTO lc_konh-vakey.
MOVE lc_rule-zzextwg TO lc_komg-komg-zzextwg.
WHEN 'A719'.
CONCATENATE: blank_agree_key
lc_rule-werks INTO lc_konh-vakey.
MOVE lc_rule-werks TO lc_komg-komg-werks.
WHEN 'A721'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-werks INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A722'.
CONCATENATE: blank_agree_key
lc_rule-vkbur INTO lc_konh-vakey.
MOVE lc_rule-vkbur TO lc_komg-komg-vkbur.
WHEN 'A724'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-vkbur INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr,
lc_rule-vkbur TO lc_komg-komg-vkbur.
ENDCASE.
MOVE: 'A' TO lc_konh-kvewe,
lc_rule-tablnam+1(3) TO lc_konh-kotabnr,
lc_rule-kappl TO lc_konh-kappl,
lc_rule-kschl TO lc_konh-kschl.
REPLACE ALL OCCURRENCES OF '~' IN lc_konh-vakey WITH ' '.
APPEND lc_konh TO lt_konh.
CLEAR lc_konh.
*--- Add in the KONP.Do we need to add
MOVE: lc_rule-kappl TO lc_konp-kappl,
lc_rule-kschl TO lc_konp-kschl,
'G' TO lc_konp-krech.
IF lc_rule-kschl+3(1) = '%'.
MOVE: 'A' TO lc_konp-krech,
'%' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-rebate_perc * 1.
ENDIF.
APPEND lc_konp TO lt_konp. CLEAR lc_konp.
APPEND lc_komg TO lt_komg. CLEAR lc_komg.
ENDLOOP.
IF lc_updt = 'I'.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CREATE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_CALL_FROM_WS = ' '
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacn = lt_cbacn
it_cbacl = lt_cbacl
it_cbtpv = lt_cbtpv
it_texts = lt_texts
it_cbasd = lt_cbasd
IMPORTING
es_agreement = lc_agreement
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
creation_failed = 3
new_pricing_not_maitained = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ELSE.
MOVE: lc_agreement-knuma_ag TO po_agreement,
lc_agreement-knuma_ag TO lc_kona-knuma.
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ELSE.
MOVE-CORRESPONDING kona TO lc_kona.
ENDIF.
LOOP AT lt_konh ASSIGNING <konh_line>.
MOVE lc_kona-knuma TO <konh_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
LOOP AT lt_konp ASSIGNING <konp_line>.
MOVE lc_kona-knuma TO <konp_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
lc_kona-updkz = 'U'.
lc_cbasp-updkz = 'U'.
CLEAR lt_messages.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CHANGE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_INIT_DATA = 'X'
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacl = lt_cbacl
it_cbacn = lt_cbacn
IT_FIELDS =
it_texts = lt_texts
IMPORTING
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
cs_agreement = lc_agreement
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
change_failed = 3
agreement_locked = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ENDFORM. " CREATE_AGREEMENT -
How to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'
Dear Experts,
Can anyone Explain me how to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'.My Requirement is i want to change the Partners of the Service Order.It is Very Urgent Requirement Please Help me.
Thanks & Regards,
Ashok.Hi,
For service order you can use FM 'BAPI_ACTIVITYCRM_CHANGEMULTI' as it is much easier to use.
Sample code is below. You can use that:
"fill the details of partner which is
"to be added as main partner or in place of Interaction Agent
wa_partner_new-ref_guid = w_guid_ref.
wa_partner_new-ref_handle = '0000000000'.
wa_partner_new-ref_kind = 'A'.
wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
wa_partner_new-ref_partner_handle = '0000'.
wa_partner_new-ref_partner_fct = 'Z_IA'.
"wa_partner-partner_no : New partner no.
wa_partner_new-ref_partner_no = wa_partner-partner_no.
wa_partner_new-ref_no_type = wa_partner-ref_no_type.
wa_partner_new-ref_display_type = wa_partner-ref_display_type.
wa_partner_new-display_type = 'BP'.
wa_partner_new-no_type = 'BP'.
wa_partner_new-partner_fct = 'Z_IA'.
"w_partner_no : Old partner no. which is to be changed
wa_partner_new-partner_no = w_partner_no.
wa_partner_new-mainpartner = 'X'.
INSERT wa_partner_new INTO TABLE it_partner_new.
wa_partner_newx-display_type = 'X'.
wa_partner_newx-no_type = 'X'.
wa_partner_newx-partner_fct = 'X'.
wa_partner_newx-partner_no = 'X'.
wa_partner_newx-mainpartner = 'X'.
INSERT wa_partner_newx INTO TABLE it_partner_newx.
IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
"maintain all changes to be done
CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
TABLES
partner = it_partner_new
partnerx = it_partner_newx.
CLEAR : wa_guid1.
REFRESH : it_guid1.
wa_guid1-guid = w_guid_ref.
APPEND wa_guid1 TO it_guid1.
"save the changes
CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
TABLES
objects_to_save = it_guid1.
"commit the transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Reply fro any further help.
Please reward points if helpful.
Regards,
Ashlesha
Maybe you are looking for
-
Print module - exporting to a .jpg file - borderless printing
I'm attempting to export a picture as an 8 x 10 .jpg file in the Print Module - I want the image to be borderless. I have gone ahead and changed my page setup to reflect the same dimensions, I've removed margins and I've also gone into the Layout sec
-
If I have a repeating event in iCal, can I attach different docs, pdfs, etc., do the events. I am entering lessonplans and want each date to have an attachment.
-
I work with SOA 10.1.3.3 (Patched). When I call an ESB Routing Service from BPEL, are generated an exception as follow: <messages><input><WBPM_IKSelectDatiTx_in><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WBPM_DASelectDatiTxSele
-
Terminal window scrollback is saved somewhere?
Dear Mac enthusiasts, Every Terminal window has a history, which is evident because you can scroll all the way back. In the Terminal Preferences there is even an option where you can set the Scrollback to unlimited, or limit it to a number of lines.
-
RFC_CALL_TRANSACTION
Hello all, Good Day. I am using Macro to updated data in to SAP. Using "RFC_CALL_TRANSACTION" Previous i am using the Below code to Get the SAP MSG. If RfcCallTransaction.Call = True Then Set Messages = RfcCallTransaction.imports(