USEREXIT_PRICING_PREPARE_TKOMK in prog. RV60AFZZ
Hi All!
In USEREXIT_PRICING_PREPARE_TKOMK in prog. RV60AFZZ I have to move a custom field ZZKVGR6 from XVBRP which will be moved to TKOMK (structure of KOMK).For this I had declared a field in the table VBRPVB(XVBRP is a structure of this table)and codede my move statement as below :
MOVE XVBRP-ZZKVGR6 TO TKOMK-ZZKVGR6.
But i am getting an error saying that xvbrp-zzkvgr6 is unknown.
Shall i have to declare in any other structures or tables.
Please advise.
Anything to do with the table T681F ??
Praneeth
Message was edited by: Praneeth kumar
The parent prog of RV60AFZZ. is SAPLV60A.(Pl do check it)
in the sample given we are basically accesing a variable from another program in memory and getting its value via our local field symbol <fs>
if we take program SAPLV60A. then it will be:
field-symbol <fs> type any.
data myfield_name(40) type c value '(SAPLV60A)VBRPVB'.
assign (myfield_name) to <fs>.
now move like this:
MOVE <fs>-ZZKVGR6 TO TKOMK-ZZKVGR6.
this way <fs>-ZZKVGR6 will have the value which is in VBRPVB-ZZKVGR6 .
hope you understood.
but as happens with field symbols this can onl be checked at run time only.
regards.
Similar Messages
-
Trigger User-Exit userexit_pricing_prepare_tkomk while changing Billing doc
Hi Experts,
Could any one of you let me know how to identify user exit "userexit_pricing_prepare_tkomk" is getting triggered while creating Billing document or while changing Billing document.
This user exit is being triggered in both the above cases.
I looked into xvbrk-updkz. No value is getting populated in change mode of Billing document for this field.
Is there any other field which will be helpful in differentiating these 2 cases.
Thanks in advance,
VinothHi Vinoth,
refer to the following link:
Re: USEREXIT_PRICING_PREPARE_TKOMK in prog. RV60AFZZ
Hope this will help you... -
Is it possible to create a condition record using a wildcard? I want to match only the first three characters of the field that is 13 characters long.
Hi Laurie,
It is possible with some customistion(development)
You have to create a new field in the field catalog.
You have to update the first 3characters of your source field into this field using the user exit USEREXIT_PRICING_PREPARE_TKOMP or USEREXIT_PRICING_PREPARE_TKOMK in include RV60AFZZ in module pool SAPLV60A
Now you can create a condition table using this field and maintain the condition records for the condition type.
DUring transactions you can find that the values are updated for the condition type, based on the value of the first 3characters of the desired field.
If you talk to the ABAPer, they will do this without much of problem.
We have done this few times and it is working fine without any problem until now
You can reward if you think this helps you -
Error Message In USEREXIT_PRICING_PREPARE_TKOMK
Hi Experts,
I am using USEREXIT_PRICING_PREPARE_TKOMK (RV60AFZZ) for t-code VF11.
The requirement is we need to show an error message .
Using "MESSAGE ennn(xxx)" statement is showing no messages instead it is raising one exception automatically.
We can write the ERROR LOG, but the user is not satisfied with that they want the "Error Message" in red at the 'Status Bar'.
Thanks in advance,
AmurtaThis user exit routine will get executed several times during the VF11 process. Hence i would suggest that you use some additional filters like check if the user is a foreground user / check SY-UCOMM system field, display the exception ONLY when the user hits SAVE (SY-UCOMM = <SAVE>).
Naresh -
FORM USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ fails in Background
Hi all,
In Include RV60AFZZ , I have added my code in
FORM USEREXIT_PRICING_PREPARE_TKOMP to Deactivate Condition types for FPD process . I activated the code. Now when I create a delivery doc (via Vf01), it gets created and saved if I do it in the fore ground, but it fails if I schedule it as Back ground job. Is this because the Include doesnt have the SAVE_DOC User exit.Please elaborate if you have any suggetsions as to why it is failing in the Background and what will be the other options to make it work in the Back ground.
Thanks,
RajThe parent prog of RV60AFZZ. is SAPLV60A.(Pl do check it)
in the sample given we are basically accesing a variable from another program in memory and getting its value via our local field symbol <fs>
if we take program SAPLV60A. then it will be:
field-symbol <fs> type any.
data myfield_name(40) type c value '(SAPLV60A)VBRPVB'.
assign (myfield_name) to <fs>.
now move like this:
MOVE <fs>-ZZKVGR6 TO TKOMK-ZZKVGR6.
this way <fs>-ZZKVGR6 will have the value which is in VBRPVB-ZZKVGR6 .
hope you understood.
but as happens with field symbols this can onl be checked at run time only.
regards. -
Events not triggering in RV60AFZZ exit USEREXIT_SAVE_DOCUMENT_PREPARE
Hi ,
I need to start workflow when invoice is created. As there is no standard event for the same, so I created new business object and trigger the event with FM SWE_EVENT_CREATE calling in user exit USEREXIT_SAVE_DOCUMENT_PREPARE in include RV60AFZZ.
This works perfectly fine when I create an invoice with VF01. But when a batch program RV60SBAT is called for the same, this is when i am facing the problem. This program takes multiple delivery numbers and creates more than one invoice documents. And in debug i see that event is created two times. Even in SWEL i see that event is created for each invoice document created.But workflows work for last document only.Workflow is a background activity which updates a table.Entries for last document are only updated. I feel this is something related to update task or some bundling technique that might be used in standard program. I mean most probably last document number is being passed to all workflows. Please help me how to counter this problem and send individual number to each workflow.Hi Nabheet,
Thanks for the quick reply. I have checked the program the values are coming fine. It is like workflow gets invoice no and calls two reports:
SUBMIT ZSDTD0008
WITH SELECTION-TABLE it_seltab AND RETURN EXPORTING LIST TO MEMORY.
SUBMIT ZSDTD0009
WITH SELECTION-TABLE it_seltab AND RETURN EXPORTING LIST TO MEMORY.
This is done inside the function module which is called inside business object method.
As two events trigger at same time(two invoices are created), proper values are passed.
Strange thing is that if i take these two in debug then above mentioned programs, process for both of them.But without debug,in background, only one is processed(second one). It is something related to SUBMIT being called parallely for the same program. -
Im on Win 7 Ultimate and had Firefox working fine with messenger in the browser & could use the pop up chat box. Since the upload I get the message that messenger is currently not available, but it works fine when I activate it as a stand alone prog. but I want it back in my browser.. cant find any setting or pref. to activate it... have cleared cache and history, restarted, even reloaded a messenger from Windows essencials.. no difference.. it been like this for 5 days since the update.. anyone got a solution? thanks alot for your help.
DFU mode:
http://www.iclarified.com/entry/index.php?enid=1034 -
How to descrbe a ref cursor from a PL/SQL prog?
Hi,
here is a sample of the my problem
let suppose a table country :
create table country(country_code VARCHAR2(3), country_name VARCHAR2(50));
then a package containing different procedures among them, this one :
PL/SQL prog
create or replace package country_pkg as
type rec1 is ref cursor return country%rowtype;
Procedure get_all_countries(rec in out rec1);
blablabla ...
END country_pkg;
in the package body, i have the following code :
create or replace package body country_pkg as
procedure get_all_countries(rec IN OUT rec1) is
begin
if not rec%open then
open rec for select * from country order by country_name;
end if;
exception
when NO_DATA_FOUND then
close rec;
end get_all_countries;
blablabla....
end;
Then in the C program
(*proc)->request->command = "begin get_all_countries(:rec); end;"
checkerr(&connect, \
OCIStmtPrepare(connect->stmthp,\
connect->errhp,\
(*proc)->request->command,\
strlen((*proc)->request->command),\
OCI_NTV_SYNTAX, OCI_DEFAULT));
checkerr(&connect, \
OCIHandleAlloc((dvoid*)(connect->envhp),\
(dvoid**) &((*proc)->stmthp), OCI_HTYPE_STMT,
(size_t) 0,\
(dvoid**) 0));
bndhp = (OCIBind**) g_malloc0((*proc)->argnum*sizeof(OCIBind*));
for(i = 0; i < (*proc)->argnum; i++)
switch ((*proc)->desc->type)
case 102:
checkerr(&connect,
OCIBindByPos(connect->stmthp, &bndhp[j],
connect->errhp,
i+1,&((*proc)->stmthp), (sb4) 0,
SQLT_REF, (dvoid*) 0, (ub2*) 0, (ub2*) 0,
(ub4) 0,
(ub4*) 0, (ub4) OCI_DEFAULT));
default:
some code ....
checkerr(&connect, \
OCIStmtExecute(connect->svchp, connect->stmthp,\
connect->errhp, 1, (ub4) 0, (OCISnapshot*) 0,\
(OCISnapshot*) 0, OCI_DEFAULT));
parm_status = OCIParamGet(connect->stmthp, OCI_HTYPE_STMT,connect->errhp, (dvoid**)&arg, 0);
while(parm_status == OCI_SUCCESS)
OCIAttrGet((dvoid*) arg, OCI_DTYPE_PARAM,
(dvoid*)type,0, (ub4) OCI_ATTR_NUM_PARAMS,
connect->errhp);
counter++;
parm_status = OCIParamGet(connect->stmthp,
OCII_HTYPE_STMT,connect->errhp,
(dvoid**)&arg, counter);
This piece of code doesn't work as 'arg' is always NULL
and OCIParamGet retruns OCI_SUCCESS.
I'm certainly missing something but I don't see what. Could anyone help me to get that piece of code working?
regards,
Raphaelunfortunately, not yet!
I dropped the matter for now, I'll come back on it later.
On your side, let me know if you find something interesting on that topic by posting a message here. -
How to analyze the standard driver prog for form F150_DUNN_01
Hi,
I'm working on a standard form F150_DUNN_01. It's standard driver prog is SAP150V.
I've modified the form, like i added some additional windows. Now i want to know where these
changes are reflected in the standard driver program.
Thanks & Regards,
R.NarsinghThe form has to be configured.
-
If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and give the extension name is plz tell me the way that office files are compatible with it.
== This happened ==
Every time Firefox opened
== when i download the office filesIn Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.''' -
Smartforms :Multiple forms 2 be printed in single print prog,PDF too
Hello Smartforms Gurus
I need to print 4 forms (Export Invoice, packing List, Enclosure to Packing list, Case marking) within a single print prog .
User will execute this prog and it should print all the 4 forms and then by clicking on a button(Archive) there
it should download a single pdf file containing all 4 forms .
At present my following program directly download this form(only Export Invoice) to a pdf file but doesnt leave options to go to Print or Print Preview .
Plz look into my code , and suggest.
Thnx
Moni
*Printing of Export Invoice, Packing List,Enclosure to Packing List & *
*Case Marking in one SMART FORMS Layout *
REPORT ZSD_REP_MULTI_PRINT.
TABLES :
vbak,
vbap,
vbpa,
vbfa,
VBRK,
VBRP,
LIKP,
LIPS,
KONV,
objk,
tvko,
ser01,
sadr,
equi,
makt,
mast,
t005t,
kna1,
t001w,
T001,
ADRC,
sscrfields,
zpp_plcmi, "Packing list history For Conf: Item data
zplh, "PACKING LIST HISTORY : HEADER DATA
zpli. "PACKING LIST HISTORY : ITEM DATA
DATA: FM_NAME TYPE RS38L_FNAM,
P_E_DEVTYPE TYPE RSPOPTYPE,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
P_DOC LIKE DOCS OCCURS 2000 WITH HEADER LINE,
P_LINES LIKE TLINE OCCURS 200,
P_BIN_FILESIZE TYPE I,
P_LANGUAGE TYPE SFLANGU,
P_BIN_FILE TYPE XSTRING,
<i>OK_CODE LIKE SY-UCOMM.</i>
DATA: T_ITEM TYPE ZSD_TABL_LITEM,
WA_ITEM TYPE ZSD_STRUCT_LITEM,
T_ADRS LIKE ZSD_STRUCT_ADRS OCCURS 0 WITH HEADER LINE,
MSLINES LIKE TLINE OCCURS 1 WITH HEADER LINE,
TIDNO LIKE STXL-TDID,
TNAME LIKE STXL-TDNAME,
TOBJT LIKE STXL-TDOBJECT,
SSORD LIKE VBAK-VBELN,
TOT LIKE VBAK-NETWR,
WORD LIKE SPELL.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: P_DELNO LIKE LIKP-VBELN OBLIGATORY,
P_INVNO LIKE VBRK-VBELN OBLIGATORY,
P_DATE LIKE SY-DATUM.
SELECTION-SCREEN END OF BLOCK blk1.
AT SELECTION-SCREEN.
CLEAR T_ADRS.
REFRESH T_ITEM.
T_ADRS-INVNO = P_INVNO.
T_ADRS-INVDAT = P_DATE.
SELECT SINGLE VBELV INTO VBFA-VBELV
FROM VBFA
WHERE VBELN = P_DELNO
AND VBTYP_N = 'J' .
SSORD = VBFA-VBELV.
*Exporter's Address
SELECT SINGLE BUKRS_VF INTO VBAK-BUKRS_VF
FROM VBAK
WHERE VBELN = VBFA-VBELV.
SELECT SINGLE ADRNR
INTO T001-ADRNR
FROM T001
WHERE BUKRS = VBAK-BUKRS_VF.
SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
T_ADRS-POST_CODE1, ADRC-COUNTRY)
FROM ADRC
WHERE ADDRNUMBER EQ T001-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-COUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
**BUYERS NO & DATE
SELECT SINGLE BSTNK BSTDK INTO (T_ADRS-BSTNK,T_ADRS-BSTDK)
FROM VBAK
WHERE VBELN = VBFA-VBELV.
*Consignee Address & Buyer Other Than Consignee
SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
FROM LIKP WHERE VBELN = P_DELNO.
IF LIKP-KUNNR = LIKP-KUNAG.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
T_ADRS-ONAME1 = T_ADRS-CNAME1 .
T_ADRS-ONAME2 = T_ADRS-CNAME2 .
T_ADRS-OSTREET = T_ADRS-CSTREET .
T_ADRS-OCITY = T_ADRS-CCITY.
T_ADRS-OPCODE = T_ADRS-CPCODE .
T_ADRS-OREGIO = T_ADRS-CREGIO.
T_ADRS-OTELF1 = T_ADRS-CTELF1 .
T_ADRS-OCOUNTRY = T_ADRS-CCOUNTRY.
ELSE.
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,
T_ADRS-CTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNNR.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-CCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
*Buyer Other than Consignee
SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
T_ADRS-OCITY, T_ADRS-OPCODE, T_ADRS-OREGIO,
T_ADRS-OTELF1, KNA1-ADRNR)
FROM KNA1
WHERE KUNNR = LIKP-KUNAG.
SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
FROM ADRC
WHERE ADDRNUMBER EQ KNA1-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-OCOUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
ENDIF.
*Other's Ref
TIDNO = 'Z071'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-OREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Buyer's Order No Ref
TIDNO = 'Z023'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-BUYER = mslines-tdline(25).
EXIT.
ENDLOOP.
*Exporter Ref
TIDNO = 'Z072'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-XPREF = mslines-tdline(25).
EXIT.
ENDLOOP.
*Pre-Carraige By
TIDNO = 'Z074'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Place Of reciept by Pre-Carraige
TIDNO = 'Z073'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLPCRG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Vessel/Flight No
TIDNO = 'Z075'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-VFNO = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Loading
TIDNO = 'Z077'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PLOAD = mslines-tdline(25).
EXIT.
ENDLOOP.
*Port Of Discharge
TIDNO = 'Z076'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-PDISG = mslines-tdline(25).
EXIT.
ENDLOOP.
*Final Destination
TIDNO = 'Z070'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-FDEST = mslines-tdline(25).
EXIT.
ENDLOOP.
*Terms Of Delivery & Payment
TIDNO = 'Z080'.
TNAME = SSORD.
TOBJT = 'VBBK'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
T_ADRS-TERMS = mslines-tdline(50).
EXIT.
ENDLOOP.
APPEND T_ADRS.
*BODY SECTION FOR LINE ITEMS
SELECT POSNR KWMENG VRKME WAERK
INTO (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
FROM VBAP
WHERE VBELN = SSORD.
*Mark/Case No
TIDNO = '0002'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-MARKNO = mslines-tdline(40).
EXIT.
ENDLOOP.
*Packing Type
TIDNO = '0003'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Description
TIDNO = '0001'.
CONCATENATE SSORD
VBAP-POSNR
INTO TNAME.
TOBJT = 'VBBP'.
PERFORM FINDTEXT.
LOOP AT MSLINES.
WA_ITEM-PACKTYP = mslines-tdline(40).
EXIT.
ENDLOOP.
*Goods Quantity
WA_ITEM-QTY = VBAP-KWMENG.
WA_ITEM-VRKME = VBAP-VRKME.
*Goods Rate
SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
SELECT SINGLE KBETR WAERS
INTO (WA_ITEM-RATE, WA_ITEM-WAERS)
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = VBAP-POSNR
AND KSCHL = 'PR00'.
*Goods Amount
WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
WA_ITEM-WAERK = VBAP-WAERK.
TOT = TOT + WA_ITEM-AMOUNT.
APPEND WA_ITEM TO T_ITEM.
ENDSELECT.
T_ADRS-TOT = TOT.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = TOT
CURRENCY = VBAP-WAERK
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = WORD
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
T_ADRS-TOT_WORDS = WORD-WORD.
APPEND T_ADRS.
START-OF-SELECTION.
<b> SET PF-STATUS '1000'.</b>
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SD_REP_MULTI_PRINT'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_LANGUAGE = 'EN'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-TDDEST = 'LOCL'.
APPEND P_OUTPUT_OPTIONS.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
APPEND P_CONTROL_PARAMETERS.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS =
TABLES
T_ADRS = T_ADRS
T_ITEM = T_ITEM
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>AT USER-COMMAND.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'ARCHIVE'.</b>
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_JOB_OUTPUT_INFO-OTFDATA
DOCTAB_ARCHIVE = P_DOC
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = P_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'C:\sd.pdf'
FILETYPE = 'BIN'
MODE = ''
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = P_BIN_FILESIZE
TABLES
DATA_TAB = P_LINES
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
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>ENDCASE.</b>
*& Form FINDTEXT
text
FORM FINDTEXT.
REFRESH mslines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = tidno
language = sy-langu
name = tname
object = tobjt
TABLES
lines = mslines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
DELETE mslines WHERE tdline IS INITIAL.
ENDFORM. "FINDTEXT
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjamanHello,
You cannot get continuous page numbers, But you will be able to merge all the 4 form outputs into one PDF file.
In yesterdays example you called one form, then converted OTF data into PDF data and downloaded on Presentation server.
In this case, after you call first form, you get the OTF data. Push this OTF data into a MAIN Internal table ( Same type as of OTF dada Int TAB ). Then Call second form. Then you get second set of OTF data. This second set of OTF data may be appended to the MAIN Internal table and the follw same procedure for the rest of the forms. In the end you will have one Internal table which holds OTF data of all the 4 forms.
Now convert the OTD data to PDF Data by the FM and Download one file which has output of all the 4 forms.
I hope my explanation is quite clear.
Regarding your second question, the Archive and Print and archive buttons on the PRINT PREVIEW screen works for Spool archiving which is to be enabled by customizing. If you wish to archive the output as PDF, you may have to do it in program.
I am NOT accessible on YAHOO.
Plz let me know if you are stuck.
Regards, Murugesh AS -
How can I set a breakpoint within a macro in order to debug a prog.?
Hello all,
How can I set a session Breakpoint inside a macro (i.e. DEFINE .... END-OF-DEFINITION) in order to debug a prog.?
I keep on getting the message: "The position of a breakpoint cannot be determined." What does this message mean?
Thanks for your help.Goharjou,
We cannot see the program control flow inside a Macro, instead we can place a break point on the statement which calls the Macro and we can see the content of variables and internal tables before and after the Macro call.
Reward if useful..
Thanks,
Madhan. -
How to change the default template for a concurrent prog ?
Hi i have Std Conc prog "Payables Posted Invoice Register". It has a std template with same name "Payables Posted Invoice Register". Now i have created a custom template and attached it to the same Data Definition.
The Requirement is that only particular users will use the custom template, hence they will chose it while running. BUt what happened now is in the Conc Prog submit screen it is taking my custom template as the default one.
Hence majority of the users wudnt look at the template and get the custom o/p.
I want to make the std template itself as the default template and make the custom template available to chose for a smaller set of users.
Thanks,
VjHi Shadab,
Yes, that is a valid work around but my task is not to create a seperate data definition and a seperate concurrent prog for it. I HAD to use the standard concurrnet prog but jsut add my template as a non defaulted template.
Anyways, i have solved it now. This is how
System Adminitration => Concurrent Programs => select ur Concurrent Prog => Update => OnSite settings .... select the template you want to default.
Thanks,
Vijay -
How to call a exec prog in another prog
how to call a exec prog in another prog.
Hi,
SUBMIT
Basic forms:
1. SUBMIT rep.
2. SUBMIT (name).
Additions:
1. ... LINE-SIZE col
2. ... LINE-COUNT line
3. ... TO SAP-SPOOL List output to the SAP spool database
4. ... USING SELECTION-SCREEN scr
5. ... VIA SELECTION-SCREEN
6. ... AND RETURN
7. ... EXPORTING LIST TO MEMORY
8. ... USER user VIA JOB job NUMBER n
9. ...Various additions for passing parameters to rep
10. ... USING SELECTION-SETS OF PROGRAM prog
Effect
Calls report rep.
Regards,
Andrej. -
Urgent : short dump while executing prog
Dear Gurus,
While executing a program i am getting following errors :
Runtime Errors PXA_NO_FREE_SPACE
Date and Time 27.01.2008 15:17:34
Short dump has not been completely stored (too big).
Error analysis
Unable to load a program of 763904 bytes.
The PXA ('program execution area') was too small to hold all
currently active programs for all users.
At present, the size of the PXA is set at 144708 Kbytes.
The largest contiguous and unlocked memory chunk has 621568 bytes.
Please do the needful at earliest, coz its very urgent.
Looking forward to your earliest response.
Thanks & Regards,
Gulrez AlamHi Alam,
Contact your Basis team guys ASAP as there seems to be nothing wrong with the prog ....
There is some memory management issue.
Regards,
Raghav
Maybe you are looking for
-
Hi , I am not able to create billing document from the delivery document .
Hi, I am facing one problem i am trying to create billing document from delivery document but it is giving error " Payer" and Sold to party not found ". in my Delivery Document field partner tab is showing only ship to party it should show payer and
-
Hi. Is it possible to use external LDAP server for my UCM server without using external LDAP server for my admin server? That is I have a domain with admin server and UCM server. My admin server doesn't have external LDAP. So is it possible to use ex
-
Core Solo Power Troubles Any Ideas?
I recently purchased a Core Solo which don't get me wrong has been a great machine only used for Front Row on Our TV Via the DVI to RCA Connector. Well after leaving it on for 2 weeks i couldn't wake it up so I power down did the PMU reset thing alon
-
Create a JAVA client calling a proxy...
Hi, I succeed creating a servlet that calls a web service via a "deployable proxy". Is it possible to create a java class (not a servlet or jsp) that connect to this proxy ? Here is a sample of my client class: InitialContext ic = new
-
Cannot load underlying module for 'Darwin'
I had to move my "Developer" account from some external drive to the internal drive of my Mac. For this I zipped the users folder, copied to the internal "users" drive and unzipped it there. Then I changed the users folder in the users settings. I al