on 09-28-2007 10:46 AM
Hi gurus,
in my GRN script,i've mentioned the storage location field as mseg-lgort and its coming out properly when executing the print output.....but my client wants to display the text instead of storage location(key)....and it's available in the tran table T001L,field name called LGOBE.
How can i display it in the script(se71) itself instead of my field &mseg-lgort&...
Anyone knows,pls do the needful here.
thanks & regards
sankar
hi write a perform routine like the following in the SE71 script
define &w_LGORT& := &mseg-SGTXT&.
perform sub_get_desc in program ZPROG_GET
using &mseg-lgort&
&mseg-werks&
changing &w_LGORT&.
endperform.
and in the code section write:
perform sub_get_desc table intab structure itcsy
outtab structure itcsy.
data: w_werks type werks_d,
w_lgort type lgort_d,
W_LGOBE TYPE LGOBE.
read table intab with key NAME = 'WERKS'.
if sy-subrc = 0.
w_werks = intab-value.
read table intab with key NAME = 'LGORT'.
IF SY-SUBRC = 0.
W_LGORT = INTAB-VALUE.
SELECT SINGLE LGOBE INTO W_LGOBE
FROM T001L WHERE WERKS = W_WERKS AND
LGORT = W_LGORT.
IF SY-SUBRC >< 0.
CLEAR W_LOGBE.
ELSE.
OUTATB-VALUE = W_LOGBE.
MODIFY OUTTAB INDEX 1 TRANSPORTING VALUE.
ENDIF.
ENDIF.
endif.
endperform.
Hope That Helps
Anirban M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Anirban Mukherjee ,
thanks for ur kind reply and sorry for the very late reply from my side.....here my system got strucked for long and just now it came.....
"and in the code section"...u r mentioning this as i've to write it...in se38...under the program name zprog_get...am i write???
in se71...after the code (u'd written)...then i've to mention the field as mseg-sgtxt or w_lgort.....
which field i've to declare it in se71...
pls reply me...on this
thanks
sankar
hI Anirban Mukherjee,
SORRY TO BOTHER U AGAIN.....I DID WHAT U'VE GIVEN BUT THE PROBLEM IS U'VE NOT MENTIONED WHAT FIELD I'VE TO DECLARE IN MY SE71 TO GIVE OUTPUT OF LGORT TEXT "LGOBE" AND NOT LGORT......
IF I DECLARE &W_LGOBE&....ITS NOT DISPLAYING THE OUTPUT...
BUT IF I MENTION &W_LGORT&...IT DIPLAYS THE TEXT OF MSEG-SGTEXT..
THIS IS I DONT WANT.....PLS REPLY ME TO HELP ON DISPLAYING THE STORAGE LOCATION TEXT AS IF RM01,IT GIVES -"RAW MATERIAL" AND NOT THE MSEG-SGTXT....
PLS DO THE NEEDFUL AT THE EARLIEST...
THANKS N REGARDS
SANKAR
Hi Anirban Mukherjee ,
thanks for the prompt reply.....
but its not coming while executing the layout ...i declared as &w_lgobe& as an output field(se71)... after ur code...like
/: endperform
&w_lgobe&
if i use &w_lgort&....the text is coming in the layout...but not the reqd one...
and if u dont mind,u've used &sapscript-telenum&...what it means...and the use of it.....???pls let me know...
in ur 1st reply...&mseg-sgtxt&...its taking correctly but not in this attempt...
pls do reply me on urgent basis...
thanks & regards
sankar
&sapscript-telenum& does nothign but define a field type and length for the field w_lgobe... try to put a break-point in the perform routine of the code and see if the cursor comes to the point and also check the return value.
AND ALSO CHANGE THE FOLLOWING INSIDE THE CODE
READ THE INTAB.
READ TABLE intab WITH KEY name = 'MSEG-WERKS'.
IF sy-subrc = 0.
w_werks = intab-value.
READ TABLE intab WITH KEY name = 'MSEG-LGORT'.
IF sy-subrc = 0.
w_lgort = intab-value.
SELECT SINGLE lgobe FROM t001l INTO w_lgobe
WHERE werks = w_werks
AND lgort = w_lgort.
IF sy-subrc = 0.
outtab-value = w_lgobe.
MODIFY outtab INDEX 1 TRANSPORTING value.
ENDIF.
ENDIF.
ENDIF.
Hope That Helps
Anirban M.
Message was edited by:
Anirban Mukherjee
Hi Anirban Mukherjee,
Waiting for ur reply.......
and one more help...when creating GRN in migo...there we can give text under the where tab window,if needs...but this one is not coming out in the ouput as like lgobe....both r updating in diff tables....
in migo...it is goitem-sgtxt structure.....
but in table view....its under mseg-sgtxt.....
for this....we have to give the remarks again in mb02....where it stores in mseg and also coming in the layout...
if possible....revert me ur replies for this also...or pls help me out to finish the 1st one....LGOBE
thanks n regards
sankar
i Just Updated the Message. Please go into debugging mode when u try to save the GRN in MIGO and follow the path BREAKPOINTS->Breakpoints at -> function Module, this will thow u a popup and on the popup write the FM name as SAVE_TEXT or tey to open the GRN in display mode in MIGO and again follow the Same debugging technique this time with FM name = READ_TEXT.
Now use this to read the text in Sap script.
Hope That Helps
Anirban M.
Hi Anirban M,
i did....the way....in display mode...went to system -> utilities -> debug screen
then i clicked back...it went to debug mode...then i given break point..and gave the fm name as read_text as what u said....
then i run the script/grn output,nothing has come....the same result....
its probabily,mistake from my side,either i didnt know how to do that....
Do u know how to move the t001l-lgobe field to the variable,which one helps me to call in the script to show the output....as like in the smartform thru form interface....
sorry to trouble u more.....really sorry for keep on replying u and asking ur help...
i know how to do it and having a little bit of knowledge in smartform....
my senior has done it in se71 by both std program and script...im just fixing up some more fields based on the client requirement....
thanks n regards
sankar
hi anirban.m
thanks a lot man....u've done it,hat's off!!!
but even if i remove the code "define w_lgobe& := &sapscript-telenum&"....
it displaying the record/output exactly man.....
what's the need for giving this code????....though anyway its working i just want to learn what the use of the code is,thats all!!!!
thanks alot...
sankar
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.