Delivery document how to print the BOM Parent and Child items
Hi,
I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.
If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
Thanks,
Gordon
Similar Messages
-
How to print the row ,column,and particular cell in separate color
how to print the row ,column,and particular cell in separate color IN ALV GRID
HI,
Here you go good program links
<a href="http://www.sapfans.com/forums/viewtopic.php?t=52107">How to Set Color to a Cell in AVL</a>
<a href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm">ALV Grid Coloring</a>
Thanks
Mahesh -
Need help with arranging Parent and Child item accordingly
Hi Experts,
I have a sales BOM in SBO, here we need to show both the Parent and child items. but we do not have to show the Sr.no and Qty for the child items.
Kindly help me out how I can do it.
Below pasted is the image of my sales order,
Also i have attached the report with it.
Requesting you to kindly help..
thanks and regards,
Nandish.The Sales BOM helps in identifying that. The product in Red is the Parent Item and the product in Grey are Child items. The paretn item is the table OITT.Code and child items are in ITT1.code.
Let me now if you require more information.
Also how can I send you the layout here for your reference?
thanks in advance,
Nandish. -
How to print the error records and success records in bdc
how to print the number of error records and success records in bdc
hai,
plz refer this program,
Z_130399130271_A
REPORT Z_130399130271_A
NO STANDARD PAGE HEADING LINE-SIZE 325.
*INCLUDE YVALIDATE.
*include bdcrecx1.
INCLUDE YINCLUDE399.
DATA ITAB LIKE TABLE OF FILE_TABLE WITH HEADER LINE.
PARAMETERS: DATASET(132) LOWER CASE.
DATA : RC TYPE I,
ERR(40) TYPE C,
SUCCESSCNT TYPE I VALUE 0,
FAILCOUNT TYPE I VALUE 0.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
DATA: BEGIN OF RECORD OCCURS 0,
data element: LIF16
LIFNR_001(016),
data element: KTOKK
KTOKK_002(004),
data element: ANRED
ANRED_003(015),
data element: NAME1_GP
NAME1_004(035),
data element: SORTL
SORTL_005(010),
data element: STRAS_GP
STRAS_006(035),
data element: PFACH
PFACH_007(010),
data element: ORT01_GP
ORT01_008(035),
data element: ORT02_GP
ORT02_009(035),
data element: LAND1_GP
LAND1_010(003),
data element: REGIO
REGIO_011(003),
data element: SPRAS
SPRAS_012(002),
data element: TELF1
TELF1_013(016),
data element: TELF2
TELF2_014(016),
data element: BANKS
BANKS_01_015(003),
data element: BANKK
BANKL_01_016(015),
data element: BANKN
BANKN_01_017(018),
END OF RECORD.
DATA: BEGIN OF ERRORITAB OCCURS 0,
LIFNR_001 LIKE LFA1-LIFNR,
KTOKK_002 LIKE LFA1-KTOKK,
ANRED_003 LIKE LFA1-ANRED,
NAME1_004 LIKE LFA1-NAME1,
SORTL_005 LIKE LFA1-SORTL,
STRAS_006 LIKE LFA1-STRAS,
PFACH_007 LIKE LFA1-PFACH,
ORT01_008 LIKE LFA1-ORT01,
ORT02_009 LIKE LFA1-ORT02,
LAND1_010 LIKE LFA1-LAND1,
REGIO_011 LIKE LFA1-REGIO,
SPRAS_012 LIKE LFA1-SPRAS,
TELF1_013 LIKE LFA1-TELF1,
TELF2_014 LIKE LFA1-TELF2,
BANKS_01_015 LIKE LFBK-BANKS,
BANKL_01_016 LIKE LFBK-BANKL,
BANKN_01_017 LIKE LFBK-BANKN,
ERRORMSG(60) TYPE C,
SERIAL TYPE I VALUE '1',
END OF ERRORITAB.
End generated data section ***
AT SELECTION-SCREEN ON VALUE-REQUEST FOR DATASET.
CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
EXPORTING
WINDOW_TITLE = 'select a file '
DEFAULT_EXTENSION = 'TXT'
DEFAULT_FILENAME = 'ASSIGN5.TXT'
FILE_FILTER =
INIT_DIRECTORY =
MULTISELECTION =
IMPORTING
RC =
TABLES
FILE_TABLE = ITAB
EXCEPTIONS
CNTL_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE ITAB INDEX 1.
DATASET = ITAB-FILENAME.
WRITE DATASET.
START-OF-SELECTION.
*perform open_dataset using dataset.
*perform open_group.
DATA T TYPE STRING.
T = DATASET.
IF T EQ ' '.
MESSAGE E110(ZX).
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = T
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = RECORD
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT RECORD.
CLEAR RC.
CLEAR ERR.
*read dataset dataset into record.
IF SY-SUBRC <> 0. EXIT. ENDIF.
RECORD-KTOKK_002 = '0001'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02K-LIFNR'
RECORD-LIFNR_001.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
RECORD-KTOKK_002.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-TELX1'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-ANRED'
RECORD-ANRED_003.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
RECORD-NAME1_004.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
RECORD-SORTL_005.
PERFORM BDC_FIELD USING 'LFA1-STRAS'
RECORD-STRAS_006.
PERFORM BDC_FIELD USING 'LFA1-PFACH'
RECORD-PFACH_007.
PERFORM BDC_FIELD USING 'LFA1-ORT01'
RECORD-ORT01_008.
PERFORM BDC_FIELD USING 'LFA1-ORT02'
RECORD-ORT02_009.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
RECORD-LAND1_010.
PERFORM BDC_FIELD USING 'LFA1-REGIO'
RECORD-REGIO_011.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
RECORD-SPRAS_012.
PERFORM BDC_FIELD USING 'LFA1-TELF1'
RECORD-TELF1_013.
PERFORM BDC_FIELD USING 'LFA1-TELF2'
RECORD-TELF2_014.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=VW'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING 'LFBK-BANKS(01)'
RECORD-BANKS_01_015.
PERFORM BDC_FIELD USING 'LFBK-BANKL(01)'
RECORD-BANKL_01_016.
PERFORM BDC_FIELD USING 'LFBK-BANKN(01)'
RECORD-BANKN_01_017.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPDA'.
PERFORM BDC_TRANSACTION USING 'XK01' CHANGING ERR RC.
DATA: SERIAL TYPE I VALUE 1.
IF RC <> 0.
FAILCOUNT = FAILCOUNT + 1.
CLEAR ERRORITAB.
ERRORITAB-SERIAL = SERIAL.
ERRORITAB-LIFNR_001 = RECORD-LIFNR_001.
ERRORITAB-KTOKK_002 = RECORD-KTOKK_002.
ERRORITAB-ANRED_003 = RECORD-ANRED_003.
ERRORITAB-NAME1_004 = RECORD-NAME1_004.
ERRORITAB-SORTL_005 = RECORD-SORTL_005.
ERRORITAB-STRAS_006 = RECORD-STRAS_006.
ERRORITAB-PFACH_007 = RECORD-PFACH_007.
ERRORITAB-ORT01_008 = RECORD-ORT01_008.
ERRORITAB-ORT02_009 = RECORD-ORT02_009.
ERRORITAB-LAND1_010 = RECORD-LAND1_010.
ERRORITAB-REGIO_011 = RECORD-REGIO_011.
ERRORITAB-SPRAS_012 = RECORD-SPRAS_012.
ERRORITAB-TELF1_013 = RECORD-TELF1_013.
ERRORITAB-TELF2_014 = RECORD-TELF2_014.
ERRORITAB-BANKS_01_015 = RECORD-BANKS_01_015.
ERRORITAB-BANKL_01_016 = RECORD-BANKL_01_016.
ERRORITAB-BANKN_01_017 = RECORD-BANKN_01_017.
ERRORITAB-ERRORMSG = ERR.
SERIAL = SERIAL + 1.
APPEND ERRORITAB.
MODIFY RECORD TRANSPORTING KTOKK_002.
DELETE RECORD WHERE KTOKK_002 = '0001'.
ELSE.
SUCCESSCNT = SUCCESSCNT + 1.
ENDIF.
ENDLOOP.
display output********************************************************
SKIP.
FORMAT COLOR 5 INTENSIFIED OFF.
WRITE:/ 'No. of records successfully uploaded: '.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE: SUCCESSCNT.
Displaying the success table******************************************
IF SUCCESSCNT <> 0.
SKIP.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE:/ 'Successful Records'.
FORMAT COLOR 7 INTENSIFIED ON.
WRITE:/(261) SY-ULINE,
/ SY-VLINE,
'S.NO', 007 SY-VLINE,
'VENDOR ACC.NUM', 023 SY-VLINE,
'VENDOR ACC GROUP', 041 SY-VLINE,
'TITLE', 048 SY-VLINE,
'VENDOR NAME', 064 SY-VLINE,
'SORT FIELD', 076 SY-VLINE,
'HOUSE NO.& STREET', 101 SY-VLINE,
'PO.BOX NO', 116 SY-VLINE,
'CITY', 129 SY-VLINE,
'DISTRICT', 141 SY-VLINE,
'COUNTRY KEY', 156 SY-VLINE,
'REGION', 166 SY-VLINE,
'LANGUAGE KEY', 180 SY-VLINE,
'TELEPHONE NO 1', 196 SY-VLINE,
'TELEPHONE NO 2', 213 SY-VLINE,
'BANK COUNTRY KEY', 231 SY-VLINE,
'BANK KEY', 241 SY-VLINE,
'BANK ACC.NO', 261 SY-VLINE,
/1(261) SY-ULINE.
FORMAT COLOR 4 INTENSIFIED ON.
SERIAL = 1.
SORT RECORD BY LIFNR_001.
LOOP AT RECORD.
WRITE:/ SY-VLINE,
SERIAL LEFT-JUSTIFIED, 007 SY-VLINE,
RECORD-LIFNR_001(016), 023 SY-VLINE,
RECORD-KTOKK_002(004), 041 SY-VLINE,
RECORD-ANRED_003(015), 048 SY-VLINE,
RECORD-NAME1_004(035), 064 SY-VLINE,
RECORD-SORTL_005(010), 076 SY-VLINE,
RECORD-STRAS_006(035), 101 SY-VLINE,
RECORD-PFACH_007(010), 116 SY-VLINE,
RECORD-ORT01_008(035), 129 SY-VLINE,
RECORD-ORT02_009(035), 141 SY-VLINE,
RECORD-LAND1_010(003), 156 SY-VLINE,
RECORD-REGIO_011(003), 166 SY-VLINE,
RECORD-SPRAS_012(002), 180 SY-VLINE,
RECORD-TELF1_013(016), 196 SY-VLINE,
RECORD-TELF2_014(016), 213 SY-VLINE,
RECORD-BANKS_01_015(003), 231 SY-VLINE,
RECORD-BANKL_01_016(015), 241 SY-VLINE,
RECORD-BANKN_01_017(018), 261 SY-VLINE.
WRITE:/(261) SY-ULINE.
SERIAL = SERIAL + 1.
ENDLOOP.
WRITE:/1(261) SY-ULINE.
ENDIF.
SKIP.
FORMAT COLOR 5 INTENSIFIED OFF.
WRITE:/ 'No. of records not uploaded: '.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE: FAILCOUNT.
*Displaying the error table
IF FAILCOUNT <> 0.
SKIP.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE:/(320) SY-ULINE,
'Error Records'.
FORMAT COLOR 7 INTENSIFIED ON.
WRITE:/ SY-ULINE, SY-VLINE,
'S.NO', 007 SY-VLINE,
'VENDOR ACC.NUM', 023 SY-VLINE,
'VENDOR ACC GROUP', 041 SY-VLINE,
'TITLE', 048 SY-VLINE,
'VENDOR NAME', 064 SY-VLINE,
'SORT FIELD', 076 SY-VLINE,
'HOUSE NO.& STREET', 101 SY-VLINE,
'PO.BOX NO', 116 SY-VLINE,
'CITY', 129 SY-VLINE,
'DISTRICT', 141 SY-VLINE,
'COUNTRY KEY', 156 SY-VLINE,
'REGION', 166 SY-VLINE,
'LANGUAGE KEY', 180 SY-VLINE,
'TELEPHONE NO 1', 196 SY-VLINE,
'TELEPHONE NO 2', 213 SY-VLINE,
'BANK COUNTRY KEY', 231 SY-VLINE,
'BANK KEY', 241 SY-VLINE,
'BANK ACC.NO', 261 SY-VLINE,
'ERROR MESSAGE', 320 SY-VLINE.
WRITE:/(320) SY-ULINE.
FORMAT COLOR 4 INTENSIFIED ON.
SORT ERRORITAB BY LIFNR_001.
LOOP AT ERRORITAB.
WRITE:/ SY-VLINE,
ERRORITAB-SERIAL LEFT-JUSTIFIED, 007 SY-VLINE,
ERRORITAB-LIFNR_001 , 023 SY-VLINE,
ERRORITAB-KTOKK_002, 041 SY-VLINE,
ERRORITAB-ANRED_003, 048 SY-VLINE,
ERRORITAB-NAME1_004, 064 SY-VLINE,
ERRORITAB-SORTL_005, 076 SY-VLINE,
ERRORITAB-STRAS_006, 101 SY-VLINE,
ERRORITAB-PFACH_007, 116 SY-VLINE,
ERRORITAB-ORT01_008, 129 SY-VLINE,
ERRORITAB-ORT02_009, 141 SY-VLINE,
ERRORITAB-LAND1_010, 156 SY-VLINE,
ERRORITAB-REGIO_011, 166 SY-VLINE,
ERRORITAB-SPRAS_012, 180 SY-VLINE,
ERRORITAB-TELF1_013, 196 SY-VLINE,
ERRORITAB-TELF2_014, 213 SY-VLINE,
ERRORITAB-BANKS_01_015, 231 SY-VLINE,
ERRORITAB-BANKL_01_016, 241 SY-VLINE,
ERRORITAB-BANKN_01_017, 261 SY-VLINE,
ERRORITAB-ERRORMSG, 320 SY-VLINE.
WRITE:/(320) SY-ULINE.
ENDLOOP.
WRITE:/ SY-ULINE.
ENDIF.
hope this ll help you..
regards,
prema.A -
How to print the current date and time?
Hi Friends!
I have tried this program to print the current time and date,
#include <iostream>
#include <time.h>
using namespace std;
int main()
time_t tim;
time(&tim);
cout << ctime(&tim);
return 0;
But it show the warning as;
warning C4996: 'ctime': This function or variable may be unsafe. Consider using ctime_s instead.
Can anyone suggest whats wrong with this?i also got many warring when i use old version keyword. as i note on think thatin new vc++ has many keyword change with _s. the old keyword works even get warring.or you can change to as it suggest.For About ctime_s
Check this link for more detail (RefLink)
No, it shows error, when you use ctime_s instead of ctime.
error C2660: 'ctime_s' : function does not take 1 arguments -
Tree control: How to disable the selection of a child item
Hello everyone,
Im having trouble with disabling the selection of a child item in a tree control. I dont know if its possible but havent found any answers on this forum regarding this issue.
Example:
Parent tag 1
child item 1
child item 2
Parent tag 2
child item a
child item b
What i would like to do is being able to select the parent tags but not the child items, because i use the name of the selected item in my program to determine which actions are allowed and those that are not. To avoid this problem i look at the first 4 letters of the name and this way i can determine if it is a parent tag or child item and take appropriate action. Im able to do this because the parent tags have fixed names. But even though nothing happens in software if i select a child item it still lights up, so for the user of the program it looks as if the child items is selected but the program doesnt do anything(because i made it that way). Thats why i want to be able to disable the selection of the child item or at least make the selection colour of the child item transparant so it doesnt look like it is selected.
Can anyone help me with this problem, if there are parts of my question you dont understand, just ask.
greetz
Ynse.Muks,
your last image disables the whole tree.
To programmatically disables an item use ActiveItem.Disabled? property.
Unfortunately this only has two states, Enabled and disabled (thus grayed).
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
How to print the attribute name and value?
Hi, All,
I am learning Jaxp and DOM.
I am trying to parse a xml document using DOM as
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse( new File(argv[0]) );
Assume that my xml have three levels. For each node, there is only one attribute (key).
Now I would like to print the name of all the nodes and the name of all the attributes and their values.
Would youn please provide me some ideas?
Thanks.
AGhttp://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXPDOM4.html
-
Parent and Child Both Variant in Subcontracting.
Dear MM Experts.
I have a scenario in subcontracting where both the material Parent and Child are having variant class.
At the time of PO creation I am able to configure the Parent Item from the characteristics but the child item is not showing me the parameters of Child when we explode the components.
Can anyone help me resolving the issues.
Yogesh Waldeyes you can
<mx:TitleWindow>
<mx:Script>
<![CDATA[
import mx.core.Application;
]]>
</mx:Script>
</mx:TitleWindow> -
How to print the superscript in smartform
Hi gurus,
Please tell me the procedure how to print the superscript in middle of the text displaying?
when we are displaying the smartform its converted to some special character like & .
please let me know procedure at the earliest
Regards
RajHi thanks for ur patience.
see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
then aftet HLL how it prints as superscript.
for HLL we are using another character format and for superscript we are using the another character format.
If posiible send me the code to write in smartforms
Regards
RAj
Points are awarded for useful answers. -
How to print the script in condensed mode
Hi to all,
Pls help me.
How to print the script in condensed mode and particular window only print in the condensed mode.Hi,
Hi
It will remove the blank spaces in front of the variable
and if you use the extension NO-GAPS
It will remove all the blank spaces in the variable field.
DATA: ws_val1 type char12.
ws_val1 = ' 100 123'.
Condense ws_val1.
Write / ws_val1.
Condense ws_val1 no-gaps.
write / ws_val1.
It will give output as
100 123
100123
The CONDENSE statement deletes redundant spaces from a string:
CONDENSE c NO-GAPS.
This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
Please check this link for sample code.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
Regards,
Raj. -
How to print the text in points wise in sap script
hi friends,
how to print the text in points wise in sap script.
ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
1. hai how ru.
2. what r u doing.
3.where r u.
like this i want numbering.. waiting for ur replys.
thanks,
kirandeclare a counter
data : cnt type char 4.
print :
cnt = cnt + 1.
&cnt& &text&
cnt = cnt + 1. and so on.
or.
if the data is in an internal table
loop at internal_table.
cnt = cnt + 1.
write form.
in script -&cnt& &text&
endloop.
Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM -
How to print the text in only last but one page in sapscripts
hiiiiiiiiiii,
explian how to print the text in only last but one page in sapscripts? wher to write the code? plz if possible explain in detail with an example?Hello,
The total no pages is given by &SAPSCRIPT-FORMPAGES& command.
So u can handle the situation in ur form like this
/: if &PAGE& = &SAPSCRIPT-FORMPAGES&
p1 TEXT
/: endif
Try in this way it may help u.
Regards -
How to print the message in 2 lines?
How to print the message in 2 lines?
Here i am having it like this... MESSAGE i000(zm) WITH lv_uname.
here I want to print lv_uname in 2 lines because it lengthy one.
Thanks,
Sridhar.No man, itas not comming..I am using the below logic to print my message:
CONCATENATE text-I01 lv_printdate1 text-I02 INTO lv_printname
SEPARATED BY space.
MESSAGE i002(zm) WITH lv_printname.
its printing in a single line... -
How to print the file name in sap
Hi All,
I have requirment like,
there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
how to print the file name of all these file in SAp like
file1.xls
file2.xls
file3.xls
file4.xls
file10.xls
Appropriate points will be rewarded.
Thanks in Advance
Arun kumarHi,
Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
<b>sample code :</b>
data: desktop_dir type string.
data: ifiles type table of string.
data: xfiles type string.
data: count type i.
data: filepath type string.
call method cl_gui_frontend_services=>get_desktop_directory
changing
desktop_directory = desktop_dir .
call method cl_gui_cfw=>flush.
call method cl_gui_frontend_services=>directory_list_files
exporting
directory = desktop_dir
* filter = '*.xls'
files_only = 'X'
* DIRECTORIES_ONLY =
changing
file_table = ifiles
count = count.
DATA : x_name LIKE tsp03d-name,
x_dest LIKE tsp03d-padest VALUE 'LOCL',
x_rows LIKE sxpcklsti1-body_num VALUE 0,
x_startrow LIKE sxpcklsti1-body_start VALUE 1,
x_pages LIKE rspotype-pages VALUE 1,
x_pages_1 TYPE p DECIMALS 2,
x_rqtitle LIKE sxpcklsti1-obj_descr,
x_rqcopies TYPE i VALUE 1,
x_rqowner LIKE trdyse01cm-username,
x_immediate LIKE pri_params-primm VALUE ' ',
x_rqid LIKE tsp01-rqident,
i_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
x_pages = 1.
x_rqowner = sy-uname.
x_dest = 'LOCL'.
x_startrow = 1.
x_rqcopies = 1.
x_immediate = 'X' .
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
* name = x_name
dest = x_dest
rows = x_rows
startrow = x_startrow
pages = x_pages
rqtitle = x_rqtitle
rqcopies = x_rqcopies
rqowner = x_rqowner
immediately = x_immediate
IMPORTING
rqid = x_rqid
TABLES
text_data = i_contents
EXCEPTIONS
name_missing = 1
name_twice = 2
not_found = 3
illegal_layout = 4
internal_error = 5
size_mismatch = 6
OTHERS = 7.
IF sy-subrc <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Appana
*Reward Points for helpful answers
Message was edited by: L Appana -
How to print the Cheques in Oracle Payroll in R12
After Running the Cheque Writer Process in Oracle Payroll how can one print the Cheque Leaves in the Payroll module for each employee that is to be paid through cheque.
Please give the Navigation for the same.
Regards,
ChetanPlease if there is any one who has tried out some customisation on how to print the cheques after running the cheque writer process kindly share it with me as i am in big trouble here....
Maybe you are looking for
-
MuVo V200 - Need advice on how to play recorded files using Windows Media Pla
Hi I bought a V200. Transferred the recorded audios to my hard disk but can't get windows media player to play it. Error message of: codecs needed. It was recorded as a WAV file. Please advise. Thanks.
-
How to search in a pdf package via command line
How can I search a specific PDF file within a PDF package via the command line? Previously I have used the following code in VB6 to search a single PDF file successfully. acroPath = String(128, " ") 'initialise this string resultStatus = FindE
-
Uploading Video from Droid Incredible to Computer ??
I've had the Droid Incredible for a little over a month now (my first smartphone). I have tried several different things but nothing seems to work. Can someone please explain to me (step by step) how to upload videos from my phone to my computer?
-
Recovering files from your ipod
My computer got reconfigured, so is there a way ro recover files from your ipod to your computer? I have a windows XP not a mac,if that makes a difference.
-
Cloning an SD card with only one SD slot on computer
I have a cpap machine which writes all of its data on a 2GB SD card. I'm fairly possessive about my data, and don't like having the card out of my machine for longer than it takes to download the data each morning. Periodically the doctor wants me