List of SAP Script
Hi Friedns,
In Smartforms we can see the list of smartforms starting with Z
Tcode:SMARTFORMS...........
Similarly........How To see List of SAP SCRIPT........
I m not finding in SE71...............
is there any other transaction...or table.........
Hi,
It's there in SE71. Click the dropdown next to the form name, this will give you the hierarchy seach. From here you can switch to the alphabetic search by choosing Find -> Technical search function from the menu or ctrl+F10. The push button is the one that looks like a scroll of paper.
Regards,
Nick
Similar Messages
-
Reset page number to '1 ' for each box of packing list in sap script
hi Gurus,
I am running a packing list for delivery note . Many boxes spread across more than one page. I Need to print page number in Packing list for each box like 1 of 2 , 2 of 2. In the new page for next box , I need to print 1 of 1, 2 of 2. and goes on.
can you suggest a method to achieve this in script.
thanks,
manojHi,
Could you give me the reply for following question?
1. Are the boxes changing depends on the data? or static size? How many boxes would be displayed in a page?
2. Is it your own driver program / standard one?
3. Suppose if you have 5 pages and having 10 boxes, 2 boxes for each page, then do you need to display like,
>1 of 1 on 1st box on 1st page
>2 of 1 on 2nd box on 1st page
>1 of 2 on 1st box on 2nd page
>2 of 2 on 2nd box on 2nd page
>....
Is it so?
Once i get these details then I will let u know the way....:) -
It can not displayed sap script
i have to post invoice in vendor a/c,then run to APP successfully,then execute spool,actually hear it can displayed ABAP list file, SAP script(otf) file,and SAP script file(otf) but hear only displayed ABAP list file, SAP script(otf) file it can not displayed vendor payment advice list why. pls give me answer
Hi Shirley,
I assume the hardware is less on the target than on the source or they are different at least in terms of hardware specs
If the system is not starting, check the dev_disp.log, the stderr* files, and the dev_w0 log from the work directory to find the exact error. Does the system start if you increase or decrease this value?
Regards,
Paul -
Invoice List SAP script - Problem with SAP script functionality
Hello Friends,
I am working on SAP script - Invoice List SD_INVOICE_LIST. The invoice list contains the underlying billing documents. As per the standard functionality, in the line items, its printing the underlying billing documents with the net value. My requirement is to dig these line items into another level, meaning, I need to display the line items of billing documents as well(like material, material description, quantity, net price and net value of that item etc).
The billing linte item informatin is stored in VBRP table and the VBRP structure is not at all defined in the print program of SD_INVOICE_LIST (I.E.RVADIL01). Change of standard SAP program is not an option for me here.
In the external subroutine we can fetch these line items for each billing document in the invoice list. However, my question here is how to take these line items back to the sap script and print them in SAP script (We can print one line item but how to loop these fetched lines and print them on SAP script. Any help in this regard would be greatly appreciated.
I think there is no standard smart form exist for the invoice list. Please also let me know if there is any standard smart form available for INVOICE List.
Thanks in advanace for any help in this regard.
Best regards,
SivaHi
As you cannot change the standard, you will have to see if there are any enhancements provided in the print program. if not you have to copy into a custom one and do changes accordingly.
Thanks,
Venkatesh -
List of standard sap scripts/print programs in SAP MM and SD modules ??
Hi,
I have worked in medruck only. Can anyone give me a list of other standard sap scripts/print program names in SAP MM, FI/CO and SD modules, which often needs to be modified by the client ?
thankspress f4 in SE71
then press application heirarchy, expand the modules which ever u want.
regards.
santhosh reddy
Reward if useful -
How to find List of Z forms in sap script?
Hi Could any one help me to trace out how could we find the List of z FORMS(sap script forms) in sap system..
For instance if i put z* in smartforms and press f4 i will find list of customized forms where as
when i did the same thing in sapscripts (se71) it will display a tree structure ...where its hard to trace out...waiting for your inputs!!
Regards
SasGoto SE38
& execute program RSTXFCAT.
Enter Z* in FORM field.
Best regards,
Prashant
Hi Viswa when i gone through above format i can see 6 output forms
but when i see the same in TADIR with object name as FORM i can see 10 forms
which 4 are extra but unable to get them in the sap script . when i am entering the names in form and using diaply button system is prompting as the form(those 4 FORMS ) are not existing?
WHY SO any idea...im table even i didnt find any difference as such
Regards
Sas -
521
- Heading for trans. w/out sp.G/L indicators (item sorting method 2)-
Transactions without special G/L indicators
522
- Heading for trans. with sp.G/L indicators (item sorting method 2)-
&T074T-LTEXT&
523
- Heading for open item list of line items -
&ULINE(71)&
<K>Invoice No,,Reference.,,Inv.Date,, Due date,,,,
Balance</>
&ULINE(71)&
PERFORM GET_DATE IN PROGRAM ZREPORT
USING &BSID-BELNR&
CHANGING &S_DATE&
ENDPERFORM.
530
- Line items Customer open items -
&BSID-BELNR&,,&RF140-BELEGNUM&,,&BSID-BLDAT&,,&S_DATE&,,
FORM get_date tables
int_cond structure itcsy
outt_cond structure itcsy.
BREAK SNAGI.
tables : bseg.
data : w_belnr type ITCSY-value.
DATA due_date TYPE rfpos-faedt.
READ TABLE OUTT_COND WITH KEY name = 'S_DATE'.
IF sy-subrc = 0.
outt_cond-value = S_itab11.
MODIFY outt_cond INDEX sy-tabix.
ENDIF.
SELECT SINGLE
shkzg zfbdt zbd1t zbd2t zbd3t rebzg
FROM bseg
INTO CORRESPONDING FIELDS OF bseg
WHERE
*bukrs = bukrs AND
belnr = int_cond-value.
*AND vbeln = belnr.
CALL FUNCTION 'NET_DUE_DATE_GET'
EXPORTING
i_zfbdt = bseg-zfbdt
i_zbd1t = bseg-zbd1t
i_zbd2t = bseg-zbd2t
i_zbd3t = bseg-zbd3t
i_shkzg = bseg-shkzg
i_rebzg = bseg-rebzg
I_KOART = 'D'
IMPORTING
e_faedt = due_date.
outt_cond-value = due_date.
MODIFY outt_cond INDEX sy-tabix.
ENDFORM.
Now the problem is that,it is int_cond-value is always picking up the first invoice number.
and the net due date is always same for all invoices..?
should I loop in the sap script or in the form..?Solved my self.
just placing the perform and endform in 530 -
Hi Experts,
I am trying to convert a script to pdf data.
In the open_form I set getotf = 'X' and in the close form , i get the OTf data.
I convert this otf to pdf data.
In the pdf output, I only have the static fields and no data.Though the number of pages generated are same in the PDF output and the script.
Please help me to figure it outtry this
Here is some sample code for achieving manual conversion to the OTF format.
In case of more than 10 pages:
- Check the spool request
- Click Edit -> OTF display -> No. of OTF pages
Convert SAP Script to text:
- Display the spool request
- Then click Goto -> List display
Automatic conversion to the OTF format:
tables: tline.
data: begin of int_tline1 occurs 100.
include structure tline.
data: end of int_tline1.
call function 'OPEN_FORM'
device = 'OTF_MEM'
after CLOSE_FORM
call function 'CONVERT_OTF_MEMORY'
exporting
format = 'ASCII'
max_linewidth = 132
tables
lines = int_tline1
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
write the text file to spool
loop at int_tline1.
if int_tline1-tdline = space.
skip.
else.
write:/ int_tline1-tdline.
endif.
endloop.
regards,
srinivas
<b>*reward for useful answers*</b> -
Regarding Adding multiple SAP Scripts in one Transaction
Hi All,
I have a requirement where i will have to develop one custom transaction which will have multiple SAP Script Forms to it.
The scenario is as below:
First i will have to create a Program with Selection-Screen with 10 Radio buttons in one Block - Here Each Radio Button indicated Diffrent FORM[SAP SCRIPT].
Down to it i will create another Block with some selection-screen fields. Like Order Type, Order No, Customer PO number, SOLD TO, BILL TO, SHIP TO etc.
And based on Radio button selected allowed order types will vary!
So after selecting one Form[Radio button] and enetring other selection fields once i press execute button.
i need to display list of Orders in ALV List output with check boxes for each record in the List Output.
Here all the radio button Forms are related to <b>Sales Order document and Delivery document</b>
So do we need to create new ALV List Report (or) We can use submit <b>VF31</b> transaction's program <b>[sd70av3a]</b>.
After we are displayed with orders in the output.
Then we should provide a functionality as such if user selects mutiple Orders/Check boxes he should be able to view multiple Orders one after other, and simultaneously generate PDF Files for Each Order Selected and attach them in Mail send them to Block of users.
Can anybody give there sujjestions.
Without generating spool request no's is it possible to generate PDF files for SAP SCript output!
Is it possible to Generate & attach one/multiple PDF files to mail ID and send them to list of users!
Can anybody give inputs.
Thanks in advance.
Thanks & Regards,
Prasad.hi prasad,
There is one concept called Print Work Bench(PWB) to print the multiple scripts or smartforms which r assigned to a same transaction.
If u need the info related to PWB shoot me a test mail to [email protected]
i will send u the same
fot the same u can check the below link also
http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm
<b>Prasad i didn't get the mail from you plz check it once again</b>
If u find it useful plz mark the points
Regards,
Naveen
Message was edited by: NAVEENKUMAR GUDURI -
How to print Vertical barcode in SAP script
I want to print barcode related items in SAP script . can you plz tell me any one
1.How to print vertical barcode in SAP script ?
2.How to print vertical text in SAP script ?1.
Create the character format in se71, in that select standard barcode. like
Char.format: C1 Description: Barcode
Barcode: BC_CD39 save the character format.
you can select from the list.
in the form coding, can you use barcode like
<C1> program variablr <>.
<C1> &itab-matnr <>. "--->like this
Then it shows the barcode in output.
check this.
2. for vertical text ..
if this is a window text then its possible but
like
S
H
I
P
T
O
This is possible in giving the window name but in the layout i never tried this.
If u can tell the scenario(with data reference) then may be i can try but not sure that this will give me hit.
regards,
vijay. -
Dump error when clicked on text elements in SAP Script window
Hi All,
There is an inclusion in SAP Script. I have written the code in driver program. I need to pass the value to SAP Script in the requested position. But when I go to SE71 > Form Name > Change or Display > MAIN Window > Text Elements > I get a dump error.
Category ABAP Programming Error
Runtime Errors DATA_LENGTH_TOO_LARGE
Except. CX_SY_RANGE_OUT_OF_BOUNDS
ABAP Program SAPLSTXK
Application Component BC-SRV-SCR
Date and Time 30.04.2014 20:00:08
Short text
Invalid partial field access: Length is too large
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSTXK" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not
caught in
procedure "TOKEN_COMMENT" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the executed program "SAPLSTXK", the system attempted to access the field
"ITF_TOKEN" of the type "C" and with the length 255 using the length 272.
However, a partial field access with a length specification that is
larger than the field length is not allowed.
How to correct the error
Reduce the length used to access the field.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DATA_LENGTH_TOO_LARGE" "CX_SY_RANGE_OUT_OF_BOUNDS"
"SAPLSTXK" or "LSTXKFRN"
"TOKEN_COMMENT"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
2937 * todo empty comment ???
2938 if g_tm_open eq true or " Section
2939 g_tm_b_close eq true.
2940 l_token = '\chcbpat0'.
2941 l_len = strlen( l_token ).
2942 token_control = true.
2943 assign l_token to <itf1>.
2944 perform put_itf1_new using l_len.
2945 perform token_line_begin changing l_next_token.
2946 else. " without section
2947 concatenate '\chcbpat0\line' g_cf_string l_cbpat_token into l_token.
2948 l_len = strlen( l_token ).
2949 token_control = true.
2950 assign l_token to <itf1>.
2951 perform put_itf1_new using l_len.
2952 endif.
2953 elseif l_next_token-code eq ')L'. " \par
2954 l_token = '\par'.
2955 l_len = strlen( l_token ).
2956 token_control = true.
2957 assign l_token to <itf1>.
2958 perform put_itf1_new using l_len.
2959 elseif l_next_token-code eq '(C' or " \par + format
2960 l_next_token-code eq ')C' or
2961 l_next_token-code eq '(&' or
2962 l_next_token-code eq 'TA' or
2963 l_next_token-code eq 'SC' or
2964 l_next_token-code eq 'ST'.
2965 concatenate '\chcbpat0\par' g_pf_string g_cf_string l_cbpat_token into l_token.
2966 l_len = strlen( l_token ).
>>>>> itf_token(l_len) = l_token.
2968 token_control = true.
2969 assign l_token to <itf1>.
2970 perform put_itf1_new using l_len.
2971 endif.
2972
2973 * Step 7: (L to disarm
2974 if g_compose eq true and
2975 l_next_token-code eq '(L'.
2976 perform read_next_itf_token(rstxscan) using p_token.
2977 endif.
2978
2979 ENDFORM. " token_comment
2980 *&---------------------------------------------------------------------*
2981 *& Form create_lang_info
2982 *&---------------------------------------------------------------------*
2983 * add default language to rtf
2984 *----------------------------------------------------------------------*
2985 * -->P_HEADER text
2986 * <--P_RESULT text
How do I open the text elements? I need to pass the variable inside SAP Script.
Please Help. The requirement is pending from very long. Not able to rectify this issue.
Regards,
RekhaHi,
There is a SAP Note about this problem
566794 - Runtime error: STRING_OFFSET_TOO_LARGE during conversion
Correction Instructions
Correction Instructions
Software Component
Valid from
Valid to
Number
SAP_BASIS
46B
46D
473267
SAP_BASIS
610
620
473185
Support Packages & Patches
Support Packages
Software Component
Release
Support Package
SAP_BASIS
46B
SAPKB46B48
46C
SAPKB46C39
46D
SAPKB46D28
610
SAPKB61027
620
SAPKB62014
Regards
Miguel -
Purpose of RSTXTRAN program for SAP-Script ?? ??
Purpose of RSTXTRAN program for SAP-Script ?? ??
when it is required to run that program ?Hi sarit,
Purpose of RSTXTRAN program for SAP-Script Transfer of SAP script Texts to a Correction.
The report RSTXTRAN allows a set of SAP script texts (or the text key) to be transferred to a correction or repair of the transport system. The name of the correction/repair can either be transferred as a report parameter, or the correction/repair can be selected later in a selection window. The text key can be qualified generically using the asterisk character (*).
When the report has been executed, the list of selected texts appears. Individual texts can be deselected in this list. When the function "Continue" is executed, the final list of texts which are to be transferred is displayed. The transfer of texts to the correction/repair can now be activated by the appropriate function, and must be confirmed in a dialog box.The requirements for this as follows.
There is a correction/repair in which the selected text keys can be entered, if it is not being processed. The report can only insert text keys in corrections or repairs, not however in transport requests. However, the objects contained in a correction can be transferred to a transport request with the correction and transport system transaction.
It should also be noted that the report selects texts in the current client, but that the transport system generally exports texts from client 000.
When the report has been executed,the output can be a list of the selected texts. Information about whether transfer to the correction/repair was possible is displayed for each text key.
Reasons for failed transfer include
o the correction/repair is currently being processed
o the correction/repair does not exist
For Example
All German standard texts with the ID ST, whose names begin with SAPSCRIPT, are to be entered in the correction B20K009999. The report parameters are then assigned values as follows:
o Correction: B20K009999
o Text object: TEXT
o Text name: SAPSCRIPT*
Thanks,
Usha -
Problem in Sap Script while printing
HI,
This report calling when I print billing document .this report getting data and call some sap script form but it prints 20 pages in place of only one page. Please
Guide me to finding the exact problem.the code is below..
REPORT zsd_excinv LINE-SIZE 110 LINE-COUNT 100 MESSAGE-ID vn.
TABLES: vbco3, "Keyfelder Vertriebsbeleg: Dokumentendruck
tvko, "Verkaufsorganisation
sadr, "Adressen
komk, "Communicationarea for conditions
komp, "Communicationarea for conditions
komvd, "Communicationarea for conditions
vbdkr, "Druck Rechnung: Kopfdaten
vbdpr, "Druck Rechnung: Positionsdaten
conf_out, "Configuration data
vbpla, "Druck Packliste : allgemeine Daten
vbplk, "Druck Packliste : Versandelementkopfdaten
vbplp, "Druck Packliste : Versandelementinhaltsdaten
vbpls. "Druck Packliste : Summendaten Verpackung
TABLES : j_1iexchdr, j_1iexcdtl, vbrk,eikp,j_1imocust,likp,
j_1iregset, itcpp,kna1, t001w.
*PARAMETER : p_grp LIKE j_1iexchdr-exgrp.
*SELECT-OPTIONS : so_num FOR j_1iexchdr-exnum.
*PARAMETERS : p_num LIKE j_1iexchdr-exnum.
DATA : wa_j_1iexchdr TYPE j_1iexchdr,
it_j_1iexchdr TYPE TABLE OF j_1iexchdr.
DATA : wa_j_1iexcdtl TYPE j_1iexcdtl,
it_j_1iexcdtl TYPE TABLE OF j_1iexcdtl.
DATA : wa_vbrk TYPE vbrk,
wa_vbrp TYPE vbrp,
wa_lips TYPE lips,
wa_j_1iregset TYPE j_1iregset,
wa_j_1iwrkcus TYPE j_1iwrkcus,
wa_j_cust TYPE j_1imocust,
it_vbrp TYPE TABLE OF vbrp.
DATA : BEGIN OF wa_header,
exnum TYPE j_1iexchdr-exnum ,
exdat TYPE j_1iexchdr-exdat ,
exccd TYPE j_1iregset-j_1iexccd,
excrg TYPE j_1iregset-j_1iexcrg,
excd1 TYPE j_1iregset-j_1iexcdi,
bstnk_vf TYPE vbrk-bstnk_vf,
zterm TYPE vbrk-zterm,
iever TYPE eikp-iever,
btgew TYPE likp-btgew,
chapid TYPE j_1iexcdtl-chapid,
traid TYPE likp-traid,
rdoc TYPE j_1iexchdr-rdoc,
maktx TYPE j_1iexcdtl-maktx,
meins TYPE likp-gewei,
END OF wa_header.
*DATA : BEGIN OF wa_header,
exnum TYPE j_1iexchdr-exnum ,
exdat TYPE j_1iexchdr-exdat ,
exccd TYPE j_1iregset-j_1iexccd,
excrg TYPE j_1iregset-j_1iexcrg,
excd1 TYPE j_1iregset-j_1iexcdi,
bstnk_vf TYPE vbrk-bstnk_vf,
zterm TYPE vbrk-zterm,
iever TYPE eikp-iever,
btgew TYPE likp-btgew,
ntgew TYPE likp-ntgew,
chapid TYPE j_1iexcdtl-chapid,
traid TYPE likp-traid,
rdoc TYPE j_1iexchdr-rdoc,
maktx TYPE j_1iexcdtl-maktx,
meins TYPE likp-gewei,
END OF wa_header.
*DATA : BEGIN OF wa_detail,
zeile TYPE j_1iexcdtl-zeile,
matnr TYPE j_1iexcdtl-matnr,
maktx TYPE j_1iexcdtl-maktx,
menge TYPE j_1iexcdtl-menge,
rate TYPE konv-kbetr,
amount TYPE konv-kwert,
fob TYPE konv-kwert,
meins TYPE j_1iexcdtl-meins,
*END OF wa_detail.
*DATA : BEGIN OF wa_duties,
zpr0 TYPE konv-kbetr,
jadc TYPE konv-kbetr,
st1 TYPE konv-kwert,
jexp TYPE konv-kbetr,
jecs TYPE konv-kbetr,
st2 TYPE konv-kwert,
jetc TYPE konv-kbetr,
st3 TYPE konv-kwert,
jsad TYPE konv-kbetr,
st4 TYPE konv-kwert,
st5 TYPE konv-kwert,
vat TYPE konv-kbetr,
st6 TYPE konv-kwert,
zint TYPE konv-kbetr,
jead TYPE konv-kbetr,
zect TYPE konv-kbetr,
zsad TYPE konv-kbetr,
vat_per TYPE konv-kbetr,
vat_val TYPE konv-kwert,
total TYPE konv-kwert,
remtime TYPE j_1iexchdr-remtime,
exdat TYPE j_1iexchdr-exdat,
*END OF wa_duties.
*DATA : wa_t618t TYPE t618t.
*DATA : in_words TYPE spell,
word TYPE spell-word,
decword TYPE spell-decword,
gv_plant_adrnr TYPE t001w-adrnr,
lv_iever TYPE eikp-iever,
lv_btgew TYPE likp-btgew,
lv_ntgew TYPE likp-ntgew,
lv_traid TYPE likp-traid,
lv_regid TYPE j_1iregset-j_1iregid,
gv_cust_adrnr TYPE kna1-adrnr,
gv_ecsduty TYPE konv-kbetr,
gv_tot_cen_amt TYPE konv-kwert,
gv_zterm TYPE tvzbt-vtext,
gv_tot_amt TYPE konv-kwert,
lv_ins TYPE konv-kbetr,
lv_fre TYPE konv-kbetr.
*CONSTANTS : c_ecs TYPE j_1iexcdtl-ecsrate VALUE '0.368'.
*SELECT-OPTIONS : so_num FOR j_1iexchdr-exnum.
DATA : BEGIN OF wa_detail,
zeile TYPE j_1iexcdtl-zeile,
matnr TYPE j_1iexcdtl-matnr,
maktx TYPE j_1iexcdtl-maktx,
menge TYPE j_1iexcdtl-menge,
rate TYPE konv-kbetr,
amount TYPE konv-kwert,
fob TYPE konv-kwert,
meins TYPE j_1iexcdtl-meins,
END OF wa_detail.
DATA : BEGIN OF wa_duties,
zpr0 TYPE konv-kwert,
jadc TYPE konv-kwert,
st1 TYPE konv-kwert,
jexp TYPE konv-kwert,
jecs TYPE konv-kwert,
st2 TYPE konv-kwert,
jetc TYPE konv-kwert,
st3 TYPE konv-kwert,
jsad TYPE konv-kwert,
st4 TYPE konv-kwert,
st5 TYPE konv-kwert,
vat TYPE konv-kwert,
st6 TYPE konv-kwert,
zint TYPE konv-kwert,
jead TYPE konv-kwert,
jeap TYPE konv-kwert,
jeap_per TYPE konv-kbetr,
zect TYPE konv-kwert,
zect_per TYPE konv-kbetr,
zecs TYPE konv-kwert,
zsad TYPE konv-kwert,
vat_per TYPE konv-kwert,
vat_val TYPE konv-kwert,
zlst_per TYPE konv-kwert,
zlst_val TYPE konv-kwert,
zcst_per TYPE konv-kwert,
zcst_val TYPE konv-kwert,
zeap TYPE konv-kwert,
zeap_per TYPE konv-kbetr,
total TYPE konv-kwert,
remtime TYPE j_1iexchdr-remtime,
exdat TYPE j_1iexchdr-exdat,
END OF wa_duties.
DATA : wa_t618t TYPE t618t.
DATA : temp TYPE konv-kwert VALUE 0,
cen_amt TYPE konv-kbetr VALUE 0.
DATA : in_words TYPE spell,
word TYPE spell-word,
decword TYPE spell-decword,
gv_plant_adrnr TYPE t001w-adrnr,
lv_iever TYPE eikp-iever,
lv_btgew TYPE likp-btgew,
lv_traid TYPE likp-traid,
lv_regid TYPE j_1iregset-j_1iregid,
gv_cust_adrnr TYPE kna1-adrnr,
gv_ecsduty TYPE konv-kbetr,
gv_tot_cen_amt TYPE konv-kwert,
gv_zterm TYPE tvzbt-vtext,
gv_tot_amt TYPE konv-kwert,
gv_amount TYPE konv-kwert,
lv_ins TYPE konv-kbetr,
lv_fre TYPE konv-kbetr.
CONSTANTS : c_ecs TYPE j_1iexcdtl-ecsrate VALUE '0.368',
rdocyr TYPE j_1iexchdr-docyr VALUE 2006.
DATA : wa_t685t TYPE t685t.
DATA : gv_zint TYPE t685t-vtext,
gv_vat TYPE t685t-vtext,
gv_zect TYPE t685t-vtext,
gv_jetc TYPE t685t-vtext,
gv_jeap TYPE t685t-vtext,
gv_jecs TYPE t685t-vtext,
gv_zlst TYPE t685t-vtext,
gv_zcst TYPE t685t-vtext,
gv_zeap TYPE t685t-vtext,
gv_jadc TYPE t685t-vtext.
INCLUDE rvadtabl.
DATA: BEGIN OF lvbplk OCCURS 0.
INCLUDE STRUCTURE vbplk. "Packlistenkopf
DATA: END OF lvbplk.
DATA: BEGIN OF lvbplp OCCURS 0.
INCLUDE STRUCTURE vbplp. "Packlistenposition
DATA: END OF lvbplp.
DATA: BEGIN OF lvbpls OCCURS 0.
INCLUDE STRUCTURE vbpls. "Packlistenstruktur
DATA: END OF lvbpls.
DATA: BEGIN OF tvbdpr OCCURS 0. "Rechnungspositionen
INCLUDE STRUCTURE vbdpr.
DATA: END OF tvbdpr.
DATA: BEGIN OF tvbplp OCCURS 10. "Packlistenposition
INCLUDE STRUCTURE vbplp.
DATA: END OF tvbplp.
DATA: BEGIN OF tkomv OCCURS 50.
INCLUDE STRUCTURE komv. "Kommunikation
DATA: END OF tkomv.
DATA: BEGIN OF tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd. "Kommunikation
DATA: END OF tkomvd.
DATA: BEGIN OF *tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF *tkomvd.
DATA: BEGIN OF hkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF hkomvd.
DATA: BEGIN OF tkomcon OCCURS 50.
INCLUDE STRUCTURE conf_out.
DATA: END OF tkomcon.
DATA: retcode LIKE sy-subrc. "Returncode
DATA: repeat(1) TYPE c.
DATA: xscreen(1) TYPE c. "Output on printer or screen
DATA: pr_kappl(01) TYPE c VALUE 'V'. "Application für Preisfindung
DATA: print_mwskz. "Mehrwertsteuer-Kz drucken
data for access to central address maintenance
INCLUDE sdzavdat.
FORM ENTRY *
Einstieg für Nachrichtensteuerung *
--> RETURN_CODE *
--> US_SCREEN *
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
Formular öffnen, aufbereiten und schließen
PERFORM formular_invoice USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "ENTRY
FORM FORMULAR_INVOICE *
Formular abarbeiten *
FORM formular_invoice USING proc_screen.
Werte aufbauen
PERFORM get_data.
Beleg unvollständig
IF vbdkr-uvall NE space OR
vbdkr-uvals NE space OR
vbdkr-uvprs NE space.
IF proc_screen = space.
retcode = 3.
IF vbdkr-uvall NE space OR vbdkr-uvals NE space.
syst-msgno = '201'.
syst-msgid = 'VN'.
syst-msgty = 'I'.
PERFORM protocol_update.
ENDIF.
IF vbdkr-uvprs NE space.
syst-msgno = '200'.
syst-msgid = 'VN'.
syst-msgty = 'I'.
PERFORM protocol_update.
ENDIF.
ELSE.
IF vbdkr-uvall NE space OR vbdkr-uvals NE space.
MESSAGE i201.
ENDIF.
IF vbdkr-uvprs NE space.
MESSAGE i200.
ENDIF.
ENDIF.
ENDIF.
CHECK retcode = 0.
SAP-SCRIPT STEUERUNG festlegen
PERFORM form_open USING proc_screen vbdkr-land1.
CHECK retcode = 0.
Formular aufbereiten
PERFORM sd_invoice_suppl.
CHECK retcode = 0.
Formular schließen
PERFORM form_close.
CHECK retcode = 0.
ENDFORM. "FORMULAR_INVOICE
FORM GET_DATA *
Daten besorgen *
FORM get_data.
PERFORM vbdkr_data. "Rechnungskopf und -liste
PERFORM vbpla_data. "Packliste
ENDFORM. "GET_DATA
FORM FORM_OPEN *
Formular öffnen *
--> US_SCREEN Output on screen *
' ' = printer *
'X' = screen *
--> US_COUNTRY County for telecommunication and SET COUNTRY *
FORM form_open USING us_screen us_country.
DATA: xdevice(8) TYPE c.
SET LANGUAGE nast-spras.
CLEAR itcpo.
MOVE-CORRESPONDING nast TO itcpo.
itcpo-tdcover = nast-tdocover.
itcpo-tddest = nast-ldest.
itcpo-tddataset = nast-dsnam.
itcpo-tdsuffix1 = nast-dsuf1.
itcpo-tdsuffix2 = nast-dsuf2.
itcpo-tdimmed = nast-dimme.
itcpo-tddelete = nast-delet.
itcpo-tdcopies = nast-anzal.
itcpo-tdprogram = sy-repid.
itcpo-tdteleland = us_country.
itcpo-tdsenddate = nast-vsdat.
itcpo-tdsendtime = nast-vsura.
IF us_screen NE space.
itcpo-tdpreview = 'X'.
itcpo-tdnoprint = 'X'.
ENDIF.
IF sy-tcode EQ 'J1IP'.
itcpo-tdpreview = 'X'.
ENDIF.
CASE nast-nacha.
WHEN '1'.
xdevice = 'PRINTER'.
WHEN '2'.
xdevice = 'TELEFAX'.
itcpo-tdtelenum = nast-telfx.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN '3'.
xdevice = 'TELETEX'.
itcpo-tdtelenum = nast-teltx.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN '4'.
xdevice = 'TELEX'.
itcpo-tdtelenum = nast-telx1.
IF nast-tland IS INITIAL.
itcpo-tdteleland = us_country.
ELSE.
itcpo-tdteleland = nast-tland.
ENDIF.
WHEN OTHERS.
xdevice = 'PRINTER'.
ENDCASE.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = tnapr-fonam
language = nast-spras
OPTIONS = itcpo
archive_index = toa_dara
archive_params = arc_params
device = xdevice
dialog = ' '
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
retcode = sy-subrc.
PERFORM protocol_update.
ENDIF.
SET COUNTRY us_country.
ENDFORM. "FORM_OPEN
FORM FORM_CLOSE *
Formular schließen *
FORM form_close.
CALL FUNCTION 'CLOSE_FORM' "...Ende Formulardruck
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
retcode = 1.
PERFORM protocol_update.
ENDIF.
SET COUNTRY space.
SET LANGUAGE space.
ENDFORM. "FORM_CLOSE
FORM SD_INVOICE_SUPPL *
Rechnung aufbereiten *
FORM sd_invoice_suppl.
CLEAR : wa_j_1iexchdr, wa_j_1iexcdtl, wa_lips, wa_duties,
gv_tot_amt.
get data from excise header
SELECT * FROM j_1iexchdr INTO TABLE it_j_1iexchdr
WHERE exgrp = '31'
AND rdoc = nast-objky
AND trntyp = 'DLFC'
AND lifnr = space
AND docyr = rdocyr.
AND exdat IN so_dat.
SORT it_j_1iexchdr BY exdat exnum.
READ TABLE it_j_1iexchdr INTO wa_j_1iexchdr INDEX 1.
SELECT * FROM j_1iexcdtl INTO TABLE it_j_1iexcdtl
FOR ALL ENTRIES IN it_j_1iexchdr
WHERE exnum = it_j_1iexchdr-exnum
AND trntyp = 'DLFC'
AND docno = it_j_1iexchdr-docno.
SORT it_j_1iexcdtl BY exdat exnum.
LOOP AT it_j_1iexchdr INTO wa_j_1iexchdr.
*open form
PERFORM open_form USING 'ZSD_EXCINV' 1
'printer' 'X'.
MOVE : wa_j_1iexchdr-exnum TO wa_header-exnum,
wa_j_1iexchdr-exdat TO wa_header-exdat,
wa_j_1iexchdr-rdoc TO wa_header-rdoc.
get plant details
SELECT SINGLE * FROM j_1iwrkcus INTO wa_j_1iwrkcus
WHERE j_1iwerks = wa_j_1iexchdr-werks.
SELECT SINGLE * FROM j_1iregset INTO wa_j_1iregset
WHERE j_1iregid = wa_j_1iwrkcus-j_1iregid.
SELECT adrnr INTO gv_plant_adrnr FROM t001w
WHERE werks = wa_j_1iexchdr-werks.
ENDSELECT.
MOVE : wa_j_1iregset-j_1iexccd TO wa_header-exccd,
wa_j_1iregset-j_1iexcrg TO wa_header-excrg,
wa_j_1iregset-j_1iexcdi TO wa_header-excd1.
get order no. from vbrk
SELECT * INTO wa_vbrk FROM vbrk
WHERE vbeln = wa_j_1iexchdr-rdoc.
ENDSELECT .
MOVE : wa_vbrk-bstnk_vf TO wa_header-bstnk_vf,
wa_vbrk-zterm TO wa_header-zterm.
SELECT vtext FROM tvzbt INTO gv_zterm
WHERE zterm = wa_vbrk-zterm
AND spras = 'EN'.
ENDSELECT.
get nature of removal
SELECT iever INTO lv_iever FROM eikp
WHERE refnr = wa_vbrk-vbeln.
ENDSELECT.
SELECT SINGLE * FROM t618t INTO wa_t618t
WHERE expvz = lv_iever
AND spras = 'E'.
MOVE : lv_iever TO wa_header-iever.
*get consignment weight.
SELECT SINGLE * FROM vbrp INTO wa_vbrp
WHERE vbeln = wa_vbrk-vbeln.
READ TABLE it_j_1iexcdtl INDEX 1 INTO wa_j_1iexcdtl.
SELECT btgew traid gewei INTO (lv_btgew, lv_traid, wa_header-meins) FROM likp
WHERE vbeln = wa_j_1iexcdtl-rdoc1.
ENDSELECT.
MOVE : lv_btgew TO wa_header-btgew,
lv_traid TO wa_header-traid.
lv_weight to wa_header-meins.
*get chapter id
READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl WITH KEY exnum = wa_j_1iexchdr-exnum .
IF sy-subrc = 0.
MOVE : wa_j_1iexcdtl-chapid TO wa_header-chapid,
wa_j_1iexcdtl-maktx TO wa_header-maktx.
ENDIF.
*get customer details.
SELECT adrnr FROM kna1 INTO gv_cust_adrnr
WHERE kunnr = wa_j_1iexchdr-kunag.
ENDSELECT.
SELECT SINGLE * FROM j_1imocust INTO wa_j_cust
WHERE kunnr = wa_j_1iexchdr-kunag.
*write invoice header details
PERFORM write_form USING '' 'APPEND' 'BODY' 'LOCCODE' .
*get data from excise details.
LOOP AT it_j_1iexcdtl INTO wa_j_1iexcdtl.
MOVE : wa_j_1iexcdtl-zeile TO wa_detail-zeile,
wa_j_1iexcdtl-matnr TO wa_detail-matnr,
wa_j_1iexcdtl-maktx TO wa_detail-maktx,
wa_j_1iexcdtl-menge TO wa_detail-menge,
wa_j_1iexcdtl-meins TO wa_detail-meins.
SELECT SINGLE * FROM vbrp INTO wa_vbrp
WHERE vbeln = wa_vbrk-vbeln
AND matnr = wa_j_1iexcdtl-matnr.
SELECT kbetr kwert FROM konv
INTO (wa_detail-rate, wa_detail-amount)
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZPR0'.
ENDSELECT.
SELECT kwert FROM konv
INTO lv_ins
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZINS'.
ENDSELECT.
SELECT kwert FROM konv
INTO lv_fre
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZFRE'.
ENDSELECT.
wa_detail-fob = wa_detail-amount + lv_ins + lv_fre.
gv_tot_amt = gv_tot_amt + wa_detail-amount.
gv_amount = gv_amount + wa_detail-amount.
write item details
PERFORM write_form USING 'LINE_ITEMS' 'SET' 'BODY' 'MAIN' .
ENDLOOP.
**get insurance .
SELECT kwert INTO lv_ins FROM konv
WHERE knumv = wa_vbrk-knumv
AND kschl = 'ZINS'.
ENDSELECT.
**get freight .
SELECT kwert INTO lv_fre FROM konv
WHERE knumv = wa_vbrk-knumv
AND kschl = 'ZFRE'.
ENDSELECT.
**get net value .
MOVE wa_vbrk-netwr TO wa_costs-grandtot.
**calculate netvalue(fobvalue)
wa_costs-fobval = wa_costs-grandtot + wa_costs-insurance + wa_costs-freight.
gv_tot_amt = gv_tot_amt + lv_ins + lv_fre.
*get values for different condition types.
SELECT kbetr INTO wa_duties-zpr0 FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZPR0'.
ENDSELECT.
SELECT kwert INTO wa_duties-jadc FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JADC'.
temp = temp + wa_duties-jadc.
CLEAR : wa_duties-jadc.
ENDSELECT.
MOVE : temp TO wa_duties-jadc.
CLEAR : temp.
wa_duties-st1 = wa_duties-zpr0 + wa_duties-jadc.
SELECT kwert INTO wa_duties-jexp FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEXP'.
temp = temp + wa_duties-jexp.
CLEAR : wa_duties-jexp.
ENDSELECT.
MOVE : temp TO wa_duties-jexp.
CLEAR : temp.
SELECT kwert INTO wa_duties-jecs FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JECS'.
temp = temp + wa_duties-jecs.
CLEAR : wa_duties-jecs.
ENDSELECT.
MOVE : temp TO wa_duties-jecs.
CLEAR : temp.
wa_duties-st3 = gv_tot_amt + wa_j_1iexchdr-exbed + wa_j_1iexchdr-ecs.
SELECT kwert INTO wa_duties-jetc FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JETC'.
temp = temp + wa_duties-jetc.
CLEAR : wa_duties-jetc.
ENDSELECT.
MOVE : temp TO wa_duties-jetc.
CLEAR : temp.
wa_duties-st3 = wa_duties-zpr0 + wa_duties-st2 + wa_duties-jetc.
SELECT kwert INTO wa_duties-jsad FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JSAD'.
temp = temp + wa_duties-jsad.
CLEAR : wa_duties-jsad.
ENDSELECT.
MOVE : temp TO wa_duties-jsad.
CLEAR : temp.
SELECT kbetr kwert INTO (wa_duties-jeap_per, wa_duties-jeap) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEAP'.
temp = temp + wa_duties-jeap.
CLEAR : wa_duties-jeap.
ENDSELECT.
MOVE : temp TO wa_duties-jeap.
CLEAR : temp.
wa_duties-jeap_per = wa_duties-jeap_per / 10.
SELECT kbetr kwert INTO (wa_duties-zeap_per, wa_duties-zeap) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZEAP'.
temp = temp + wa_duties-zeap.
CLEAR : wa_duties-zeap.
ENDSELECT.
MOVE : temp TO wa_duties-zeap.
CLEAR : temp.
wa_duties-zeap_per = wa_duties-zeap_per / 10.
(st2jetcjsad)
wa_duties-st4 = wa_duties-st2 + wa_duties-jetc + wa_duties-jsad.
(zpr0+st4)
wa_duties-st5 = wa_duties-zpr0 + wa_duties-st4 .
SELECT kbetr INTO wa_duties-vat FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'VAT'.
ENDSELECT.
SELECT kbetr kwert INTO (wa_duties-vat_per, wa_duties-vat_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZVAT'.
temp = temp + wa_duties-vat_val.
CLEAR : wa_duties-vat_val.
ENDSELECT.
MOVE : temp TO wa_duties-vat_val.
CLEAR : temp.
wa_duties-vat_per = wa_duties-vat_per / 10.
SELECT kbetr kwert INTO (wa_duties-zcst_per, wa_duties-zcst_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZCST'.
temp = temp + wa_duties-zcst_val.
CLEAR : wa_duties-zcst_val.
ENDSELECT.
MOVE : temp TO wa_duties-zcst_val.
CLEAR : temp.
wa_duties-zcst_per = wa_duties-zcst_per / 10.
SELECT kbetr kwert INTO (wa_duties-zlst_per, wa_duties-zlst_val) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZLST'.
temp = temp + wa_duties-zlst_val.
CLEAR : wa_duties-zlst_val.
ENDSELECT.
MOVE : temp TO wa_duties-zlst_val.
CLEAR : temp.
wa_duties-zlst_per = wa_duties-zlst_per / 10.
(st5+vat)
wa_duties-st6 = wa_duties-vat_val + wa_duties-st5 .
SELECT kwert INTO wa_duties-zint FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZINT'.
temp = temp + wa_duties-zint.
CLEAR : wa_duties-zint.
ENDSELECT.
MOVE : temp TO wa_duties-zint.
CLEAR : temp.
SELECT kwert INTO wa_duties-jead FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'JEAD'.
temp = temp + wa_duties-jead.
CLEAR : wa_duties-jead.
ENDSELECT.
MOVE : temp TO wa_duties-jead.
CLEAR : temp.
SELECT kbetr kwert INTO (wa_duties-zect_per, wa_duties-zect) FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZECT'.
temp = temp + wa_duties-zect.
CLEAR : wa_duties-zect.
ENDSELECT.
MOVE : temp TO wa_duties-zect.
CLEAR : temp.
wa_duties-zect_per = wa_duties-zect_per / 10.
SELECT kwert INTO wa_duties-zsad FROM konv
WHERE knumv = wa_vbrk-knumv
AND kposn = wa_vbrp-posnr
AND kschl = 'ZSAD'.
temp = temp + wa_duties-zsad.
CLEAR : wa_duties-zsad.
ENDSELECT.
MOVE : temp TO wa_duties-zsad.
CLEAR : temp.
IF wa_vbrk-kalsm = 'ZINSCR'.
wa_duties-total = gv_tot_amt
+ wa_duties-jexp
+ wa_duties-jecs
+ wa_duties-zlst_val
+ wa_duties-zint
+ wa_duties-jead
+ wa_duties-vat_val
+ wa_duties-zcst_val.
+ wa_duties-jecs
+ wa_duties-zeap
+ wa_duties-zecs
+ wa_duties-zsad
+ wa_duties-jadc.
ELSEIF wa_vbrk-kalsm = 'ZINFAC'.
wa_duties-total = gv_tot_amt
+ wa_duties-jexp
+ wa_duties-jecs
+ wa_duties-zlst_val
+ wa_duties-zint
+ wa_duties-jeap
+ wa_duties-vat_val
+ wa_duties-zcst_val
+ wa_duties-jecs
+ wa_duties-zeap
+ wa_duties-zect.
+ wa_duties-zsad
+ wa_duties-jadc.
ENDIF.
Get Condition descriptions.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZVAT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_vat.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZVAT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_vat.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZLST' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zlst.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZCST' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zcst.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZECT' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zect.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'ZEAP' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_zeap.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JETC' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jetc.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JEAP' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jeap.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JECS' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jecs.
CLEAR wa_t685t.
SELECT SINGLE * FROM t685t INTO wa_t685t
WHERE kschl = 'JADC' AND spras = 'EN'.
MOVE wa_t685t-vtext TO gv_jadc.
CLEAR wa_t685t.
gv_ecsduty = wa_j_1iexchdr-exbed * ( c_ecs / 100 ).
cen_amt = wa_duties-jexp + wa_duties-jeap.
gv_tot_cen_amt = cen_amt + wa_duties-jecs.
MOVE wa_j_1iexchdr-remtime TO wa_duties-remtime.
MOVE wa_j_1iexchdr-exdat TO wa_duties-exdat.
Convert amount to words.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = wa_duties-total
currency = 'INR '
filler = space
language = sy-langu
IMPORTING
in_words = in_words
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.
MOVE : in_words-word TO word,
in_words-decword TO decword.
write duty details
IF wa_vbrk-kalsm = 'ZINSCR'.
PERFORM write_form USING 'ZINSCR' 'APPEND' 'BODY' 'GRANDTOT' .
ELSEIF wa_vbrk-kalsm = 'ZINFAC'.
PERFORM write_form USING 'ZINFAC' 'APPEND' 'BODY' 'GRANDTOT' .
ENDIF.
*close form
PERFORM close_form.
ENDLOOP.
ENDFORM. "SD_INVOICE_SUPPL
FORM FORM_TITLE_PRINT *
Formulartitel entsprenchend des Feldes VBTYP drucken *
FORM form_title_print.
CASE vbdkr-vbtyp.
WHEN 'M'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_M'
window = 'HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'N'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_N'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'O'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_O'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'P'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_P'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'S'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_S'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'U'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_U'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN OTHERS.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_M'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDCASE.
IF repeat NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'REPEAT'
window = 'REPEAT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "FORM_TITLE_PRINT
FORM REFERENCE_NUMBER *
Referenznummer ausgeben *
FORM reference_number.
CHECK vbdkr-vbtyp CA 'MUN'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'INVOICE'
EXCEPTIONS
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "REFERENCE_NUMBER
FORM HEADER_TEXT_PRINT *
Kopftexte ausgeben *
FORM header_text_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "HEADER_TEXT_PRINT
FORM ITEM_PRINT *
Rechnungsposition ausgeben *
FORM item_print.
Kopieren LVBPLP für direkt Zugriff
LOOP AT lvbplp.
MOVE-CORRESPONDING lvbplp TO tvbplp.
APPEND tvbplp.
ENDLOOP.
LOOP AT tvbdpr.
vbdpr = tvbdpr.
IF tvbdpr-charg IS INITIAL.
PERFORM get_item_prices.
PERFORM get_item_characteristics.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE'.
PERFORM item_price_print.
PERFORM item_characteristics_print.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
PERFORM different_consignee.
PERFORM different_order_no.
PERFORM different_delivery_no.
PERFORM different_extern_no.
PERFORM different_purchase_order_no.
PERFORM item_packing_print.
ELSE.
IF NOT tvbdpr-fkimg IS INITIAL.
PERFORM get_item_prices.
PERFORM item_price_print.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_PRINT
FORM ITEM_PACKING_PRINT *
Verpackung zu einer Position ausgeben *
FORM item_packing_print.
DATA: count LIKE sy-index.
DATA: BEGIN OF hvbplp OCCURS 0,
stufe TYPE i.
INCLUDE STRUCTURE vbplp.
DATA: END OF hvbplp.
DATA: vs_element LIKE vbplp-venum.
CLEAR hvbplp.
REFRESH hvbplp.
Aufbau Versandelementstruktur für Ausgabe
LOOP AT tvbplp WHERE vbeln = vbdkr-vbeln AND posnr = tvbdpr-posnr.
hvbplp-stufe = 1.
MOVE-CORRESPONDING tvbplp TO hvbplp.
APPEND hvbplp.
vs_element = tvbplp-venum.
IF vs_element EQ ' '. EXIT. ENDIF. "unverpackt
CLEAR lvbplk.
WHILE lvbplk-kzobe NE 'X'. "nicht oberstes VS-Ele
suchen übergeordnetes Versandelement
LOOP AT lvbplp WHERE unvel = vs_element.
hvbplp-stufe = hvbplp-stufe + 1.
MOVE-CORRESPONDING lvbplp TO hvbplp.
APPEND hvbplp.
EXIT.
ENDLOOP.
vs_element = lvbplp-venum.
lesen übergeordnetes Versandelement
READ TABLE lvbplk WITH KEY vs_element.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDWHILE.
ENDLOOP.
SORT hvbplp BY stufe venum.
CLEAR vbplp.
LOOP AT hvbplp.
lesen Versandelement
CLEAR vbplk.
CLEAR vbpls.
IF hvbplp-venum EQ ' '.Hi,
SAPScript addresses are formated by postal standards...irrespective of the data populated....
In line
/: ADDRESS PARAGRAPH LZ
change to
/: ADDRESS DELIVERY PARAGRAPH LZ
that should bring the street into the address
Regards
Stu -
Adding Fields to New Hire SAP Script, Text ID PAMA
Hi there,
I have successfully created a sapscript email to be sent via Dynamic Actions for the notification of New Hires and Terminations. This has been accomplished via feature M0001 (we have created two new features u2013 M00NH & M00TM), dynamic action (T588z), Business Workplace, distribution lists, etc. All are working correctly, and an email is being generated and forwarded to appropriate parties.
Now we have been asked to add extra fields to the SAP Script text for New Hire and Termination. These are text fields for Employee Group, Employee Subgroup, among others.
Our syntax has been set up as follows:
&'Employee Group: 'P0001-PERSG(02)&
&'Employee Group Text: 'T501T-PTEXT(20)&
&'Employee Subgroup: 'P0001-PERSG(02)&
&'Employee Subgroup Text: 'T503T-PTEXT(20)&
For the New Hire action, we are getting the Employee group and Employee subgroup codes to display but we are NOT getting the Employee Group or Employee Subgroup texts to display. To confuse the issue, we ARE getting these text fields to display for the Termination script. Our ABAP'er is also having difficulty determining how to bring in these fields to the New Hire script.
We have researched this website have tried the instructions given by one user..... which states that we needed to go to our SAPscript text and make the following changes:
" To get other HR data into your standard text (from SO10):
Insert > Symbols > Program symbols (now you'll see a list of print programs, and i guess this is where the ABAP grabs the data).
Highlight the one for HR Master data, and click the DDIC button.
Double click the table you need data from (e.g P0000, P0001 or P0002).
Finally select the field you want."
I have done this, but when I get to the Program symbols, I do not see a print program for HR Master Data. I only see RPUCOB02 - Processing of Qualifying COBRA Events and Letters & SAPMSSCE - SAPscript Standard Text Maintenance.
I tried to use the RPUCOB02 and inserted the text for Employee Subgroup as a test. But it did not work as the text still did not display.
The other oddity is that for the Termination sapscript text, the Employee Group and Employee Subgroup text displays correctly. To test our syntax, we then connect the Termination sapscript text to the 'New Hire' action and reran the New Hire action. The Employee Group and Employee Subgroup text fields then disappeared. So it worked when the action was a termination, but did not work when the action was New Hire.
The difference between these two actions is that the feature for the sapscript generation for New Hires is being generated upon saving of I0002 (which is created AFTER I0001) - we needed the Employee's name in the text. For the Termination action, the feature is set to generate the mail upon saving of I0001. This is the only difference between the two. But as I need the employee name to display, it seemed the best approach. I did try to generate the New Hire sapscript after saving of I0008, but had the same problem.
Does anyone know how we can add text fields to our New Hire sapscript text and actually get them to display? We would also like to display the Org Unit text (&'ORGEH_2nd_TEXT(40)&) or even the Supervisor (from the OM relationship). But they do not display for the New Hire sapscript either. And our ABAP'er is able to insert the Supervisor logic, but the field still does not display.
Thanks very much for any help.
Edited by: Cathryn Westgarth on Nov 17, 2009 6:23 PM
Edited by: Cathryn Westgarth on Nov 17, 2009 6:24 PMI am going to repost this question to the HR forum as it may be more appropriately an HR forum questions.
Thanks
Cathryn -
Sap script '' how to create table frame in sap script"""
i have some problem in sap script'' how to create table frame in sap script"""
Hi,
you can use BOX command..
Syntax
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
Effect: draws a box of the specified size at the specified position.
Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
Default: Values specified in the POSITION command.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
4. FRAME: Thickness of frame.
Default: 0 (no frame).
5. INTENSITY: Grayscale of box contents as % .
Default: 100 (full black)
Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
Units of measurement: The following units of measurement may be used:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
The following conversion factors apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = height of a character relative to the CPI specification in the layout set header
1 LN = height of a line relative to the LPI specification in the layout set header
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shadowing having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
check the fallowing link also
http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
Mark the points if u find it useful...
Regards,
Omkar.
Maybe you are looking for
-
Application not working on PDA.
Hi All, I am facing a strange problem.I have made one applicationwhere i am inserting the data in to the backend.when i am doing it from Desktop mi client and Mobile 5 data is getting inserted but when i am using imate PDA windows 2003 all fileds are
-
Hello, For a while now i've not been able to preview any of my folios through the preview on device setting via the Folio builder. I have the most upto date builder panel. Anyone had this sort of problem? Thanks in advance.
-
Safari 6.0 command- doesn't work
Command+ works fine but command- doesn't work. I'm running 10.7.5
-
help me
-
I spilled juice on my Apple Wired keyboard with numpad, it was fine afterwards for a while but then suddenly the 456, rty, ghj,bnm and navigational buttons type the surrounding chars! For example, 5 types 56, down goes down & left. I really love this