Problem with MIGO
I have a PO wich have been MIGO (mov 101). Then the reception has been cancelled but non valuated ( i dont know why because the WEUNB (Goods Receipt, Non-Valuated) wasnt fleagged).
The problem is than i have the 101 valued and the 102 non valued.
I have tried to make a 101 of the same PO no valuated and later cancell it valuated (modifiying table EKPO with se16n and puting the flag) But the cancellation has no value: So I have:
102 value 0
101 value 0
102 value 0
101 14.000
How can i cancell the first the god recepit?
reggards
I cant because the All items of this document are already cancelled. Thats the problem, the document has been cancelled with no value (i dont know how can that happen) and now i have a not balance PO.
regards+
Similar Messages
-
Problem with MIGO Transaction, while posting PO with quantities 0
When I try to post a PO using MIGO, with one or more quantites 0, the output type is not appearing in VL03N. An output type "OPOD( Proof of Delivery)" will appear if all the quantities of the posted PO is greater than 0 !!
How can I resolve this ? Points will be rewarded for useful answers.Hi Naveen,
Thank you very much for the suggestion. I'm not much familiar with the MM module. Could you please give me some clue on where to find the check box ? -
Hi All,
I am having a message when i do MIGO, MIRO as follow.
Purchase order 4500017222 does not exist"
But the above number is my purchase order i got it when i created with PO wiht ME21N.
I think tables r not updating . can any one give me the solution for the same.
ThankuHi
Please check in the PO ta the header level whether a tab release strtergy exists.If so then go to transaction ME29N and release the PO.After going to transaction ME29N open the release stratergy tab in the header and release it and save the PO.Then try to do GR aganist this PO.
Along with this,please check some other settings also,which may be also the reason due to which your GR is blocked
Please check the delivery tab of PO.Check whether the GR check box is checked or not.If not checked,please check it.
Just check you have created standard PO.If by mistake you have you have created a framework order then there will not be any GR.
HOPE THIS WILL HELP YOU
Reward if useful
Thanks and Regards
SHYAM.R -
Problem with MIGO goods issue to a Service Order
Hello All
I have checked through out the forum as well as google and can not find the answer to my issue. Please read the below details and advise....
In MIGO; when trying to perform a goods issue to a service order (created in IW31) I get an error message the document does not contain any selectable items. I can not get passed this. When I use the transaction MB11, it works just fine. I went to the allowed transactions in OMJJ to ensure MIGO was listed as an allowed transaction... and MIGO is listed so I know that is not my issue. It is not related to the service order not being released as it is and plus if it was not released it would not work in MB11. I need this to work for the transaction MIGO....Please someone guide me in the proper direction of what is missing.Hi Kimberly,
When you post the goods issue as an unplanned goods movement against the order, the reservation is not even read, so it is never updated.
The data that you enter manually in this unplanned goods issue does not even need to match with the data in the reservation: the material, the plant... evrything can be different. The order is just a CO Account Assignment in this case and the reservation is not processed in any moment. This way, it is not possible to close the reservation when posting this kind of unplanned goods issue, as the reservation is not even considered (and, therefore, never updated).
It is only when you post the planned goods issue referencing the order directly when you really post your goods issue with reference to the reservation behind the order. Only in this case is when the data in the posting is checked against the reservation (the material, the plant, etc cannot be changed because they are taken directly from the reservation). Also, it is only in this case when the quantity in the posting is checked against the quantity in the reservation. If we issue the total reserved quantity, the reservation is closed automatically.
In the first case for the unplanned goods issue there is never an automatic update of the reservation because the posting does not even consider the reservation. It is only when you post the goods movement with reference to the order (in MB1A using "To Order..." and in MIGO "Goods Issue + Order") when the reservation is taken into account in the goods movement and, therefore, updated.
You can also refer to the SAP Library:
[http://help.sap.com/saphelp_erp2005/helpdata/en/a5/6337db43a211d189410000e829fbbd/frameset.htm]
It says:
"This withdrawal is unplanned because there is no reservation to be referenced."
An unplanned goods issue with the movement 261 and the order (working as CO account assignment object) is more or less the same as a 201 for a cost center. The cost center and the order are just CO Objects in this scenario.
I hope this helps you further!
Best regards,
Esther. -
Hi,
Following Details of Tcode MIGO ( Good Receipt ).
Out put Type --> WE03.
Application --> ME ( Inventory management ).
Program --> SAPM07DR
Form --> WESCHEINVERS3.
I modified the above Script Form and assign through NACE transaction code. And Configure the one Printer through SPRO , I am getting print out from only that particular printer. Here no POP UP window is generating for other printer .
How I will be able to take print out from other printers. Or how POP UP window will come.?
Manoj PiseHi,
Goto T-code SU3 -> Click Defaults->In OutputDevice U choose the print device and Save the Change---> Logout ur id and Again Login ( Once u logout that time only the parameters change saved )
or
In OPEN_FORM
OPTIONS-TDPREVIEW = 'X'.
Reward if usefull.....
Thanks,
Durai.V -
MIGO - ME23N problem with withdraw quantity
Hello,
We have found out an error when shipping outsourced materials with MIGO.
The problem comes when in a outsourcing material with components provided by us we modify the purchasing document by moving part of the stock of the component from one plant to another and dispatching the stock from only one plant. When doing this stock is not consumed from this plant, but proportionally consumed from both plants.
The given example may clarify the process:
The purchasing document has a purchasing quantity of 4 (header material). For this material to be sent from the sub-contractor to us, 16 units of one component are required (4 each header unit).
In ME23N the component data is changed, modifying the plants and creating a new line as follows. From:
Header (4 u.)
Component (16 u.) plant A
To:
Header (4 u.)
Component (12 u.) plant A
Component (4 u.) plant B
So basically we are moving part of the stock of the component to another plant.
The problem comes when plant B has stock of the component and it is sent to the sub-contractor and plant A has no stock available.
If with MIGO we try to dispatch 1 u. of the header by consuming only the 4 u. of plant B and unmark in MIGO stock from plant A, in MB51 the stock is consumed as it should be (4 u. from plant B), but when checking again in ME23N or RESB table stock is consumed proportionally.
The following process in MIGO
Header (4 u.) 1 dispatched.
Component (12 u.) 0 dispatched (not marked)
Component (4 u.) 4 dispatched (marked)
Should give the following result in RESB or ME23N:
Header (4 u.) 1 dispatched.
Component Requirement qty 12 u. Quantity Withdraw 0 Plant A
Component Requirement qty 4 u. Quantity Withdraw 4 Plant B
But we find the following result:
Header (4 u.) 1 dispatched.
Component Requirement qty 12 u. Quantity Withdraw 3 Plant A
Component Requirement qty 4 u. Quantity Withdraw 1 Plant B
And thatu2019s clearly wrong. First because all the quantity withdraw was from Plant B and second because Plant A has no Stock.
We think this might be a code error.
Thank you very much for your advice.
Regards
Edited by: Adolfo Busca on Apr 23, 2009 10:46 AMHi, Adolfo
I did a test following your example and got the same result.
Value of field Quantity Withdrawn did increase proportionally when you receive the header item.
In fact, I would rather say it shows the quantity requirement deduction of the component instead of the quantity of component you actually withdrew.
In MD04, you can see the requirement quantity of the component is also consumed proportionally while the available quantity is reduced as you actually withdrew.
With one more test, we can create a PO with Header and Component A & B. When doing GR of header item, we mark Component A and unmark Component B. In ME23N, we can see that Quantity Withdrawn field of Component B still increased. So we may say it just shows the requirement deduction of Component B.
Hope it can help.
Any further result, let's discuss it in more detail.
Wesley -
How to restrict the quantity & rate of MIRO with MIGO and PO
Hi friends,
Can any body tell me how to restrict the quantity & rate of MIRO with MIGO and PO.
e.g. if we have done MIGO for quantity 10 and the rate maintained in the PO is Rs.100.Then at the time of MIRO system should not allow to change the quantity and rate.
How we can do this?
Regards
Purnesh SharmaHi,
You are misunderstanding the use of MIRO.
If you change the details in MIRO you are NOT changing anything. You are just entering the price and quantity from the Invoice.
If this price and or qty is different from the GR aqty and PO price then the system will block the invoice for payment (and it can issue messages toinform the buyer if configured correctly).
The whole design of MIRO is based on the principle that you enter EXACTLY what the vendor has put on the invoice. By preventing the users from changing anything you will get NO mismatched invoices, but you will not be paying the vendor the amount specified on their invoice. This will surely cause problems.
If you do want to ensure that ONLY the GR qty and the PO price are used and cannot be changed then why not consider using ERS (Eveluated Receipt Settlement. this is basically self billing.
Effectively you will be paying the vendor based on what you have received in MIGO multiplied by the price from the PO. (which is what you would be doing if you stop any changes in MIRO)
Steve B -
Interactive alv report with migo miro and purchase order
hi all
to make my alv interactive i put the following code....
i dont know whether it is correct or not coz i hav not done alv before
FORM display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = wa_layout
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
it_fieldcat = it_fieldcat
TABLES
t_outtab = itab.
ENDFORM. "DISPLAY
FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'EBELN'.
READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
SET PARAMETER ID 'ITAB-EBELN' FIELD ITAB-EBELN.
call transaction 'ME23N' AND SKIP FIRST SCREEN.
CLEAR RS_SELFIELD.
ENDIF.
ENDCASE.
ENDFORM. "HANDLE_USER_COMMAND
this code is working
but i hav some problems
when ever i double click on PO number
1. it always opne the last PO number of the my alv list
2. I want to open the migo with migo number when i double clik on the migo number
3. and same for the MIRO
plz help its very urgent...
points wil b rewarded.Hi,
Following report will explains how to do interactive list in alv report regarding purchase order. Kindly go through that one.
REPORT YMS_ALVINTERSAMPLE NO STANDARD PAGE HEADING LINE-SIZE 650
MESSAGE-ID ZZ_9838.
TYPE-POOLS: SLIS.
*type declaration for values from ekko
TYPES: BEGIN OF I_EKKO,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
BUKRS LIKE EKKO-BUKRS,
BSART LIKE EKKO-BSART,
LIFNR LIKE EKKO-LIFNR,
END OF I_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
WA_EKKO TYPE I_EKKO.
*type declaration for values from ekpo
TYPES: BEGIN OF I_EKPO,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETPR LIKE EKPO-NETPR,
END OF I_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
WA_EKPO TYPE I_EKPO .
*variable for Report ID
DATA: V_REPID LIKE SY-REPID .
*declaration for fieldcatalog
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
declaration for events table where user comand or set PF status will
be defined
DATA: V_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT.
declartion for layout
DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
declaration for variant(type of display we want)
DATA: I_VARIANT TYPE DISVARIANT,
I_VARIANT1 TYPE DISVARIANT,
I_SAVE(1) TYPE C.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
INITIALIZATION.
V_REPID = SY-REPID.
PERFORM BUILD_FIELDCATLOG.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_REPORT.
*& Form BUILD_FIELDCATLOG
Fieldcatalog has all the field details from ekko
FORM BUILD_FIELDCATLOG.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-NO_OUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
ENDFORM. "EVENT_CALL
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form data_retrieval
retreiving values from the database table ekko
FORM DATA_RETRIEVAL.
SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
ENDFORM. "data_retrieval
*& Form bUild_listheader
text
-->I_LISTHEADEtext
FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA HLINE TYPE SLIS_LISTHEADER.
HLINE-INFO = 'this is my first alv pgm'.
HLINE-TYP = 'H'.
ENDFORM. "build_listheader
*& Form display_alv_report
text
FORM DISPLAY_ALV_REPORT.
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
EXCEPTIONS
PROGRAM_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.
ENDFORM. "display_alv_report
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
text
FORM BUILD_FIELDCATLOG_EKPO.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UOM'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'NETPR'.
WA_FIELDCAT-SELTEXT_M = 'PRICE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL_EKPO.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
ENDFORM. "event_call_ekpo
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT_EKPO.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form TOP_OF_PAGE
text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
*retreiving values from the database table ekko
FORM DATA_RETRIEVAL_EKPO.
SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
ENDFORM.
FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA: HLINE1 TYPE SLIS_LISTHEADER.
HLINE1-TYP = 'H'.
HLINE1-INFO = 'CHECKING PGM'.
ENDFORM.
FORM DISPLAY_ALV_EKPO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_EKPO
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT =
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKPO
EXCEPTIONS
PROGRAM_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.
ENDFORM.
Thanks,
Sankar M -
Problem with mvt. 544 O
Hi gurus.
We have a subcontracting model for purchase our FERT goods. The reception process is make trough tx. MIGO, generate a material document with a movement type 101 for FERT and 543 O for the component. The BOM structure for 1 PC are:
12 PC component B
12 PC component C
14 PC component D
The problem happens when we need to return goods to vendor. The steps that we make are:
1.- TX. Migo, option Return Delivery.
2.- Minimize the BOM explosion.
3.- Type a quantity to return and hit Enter.
4.- Open the BOM explosion. Here we found a inconsistence in the qty for each component, because appear with a smaller quantity that BOM. Today the problem with our subcontracting stock is very high.
Thanks by advice.
FelipeHi,
Are creating subcontracting BOM ? if yes then are you tracking changes to these BOM?
when you change the quantity to be returned and hit enter system should proportinally change the Qty of child parts
Please check the BOM changes or changes to the components assignment in PO
Thanks
Diwakar -
Problem with badi MB_DOCUMENT_BADI
Hi experts
i have a problem with the badi, MB_DOCUMENT_BADI this is i am using for MIGO transaction
my requirement is i need to call MR22 transaction in this badi but as this badi is calling in up date task i cann't use the call transaction statement and there is no BAPI available for MR22 transaction so could you please tell me is there any any way to process the session automatically after creating the session for MR22 transaction.
it would be great help for me
thanks in advanceLets the FM created is Z_Call_transaction_data. ( Make this FM as RFC enabled by selecting radiobutton Remote- Enabled Module in Attributes of the FM)
Call this FM in ur BADiI Method as :
Call function 'Z_Call_transaction_data.' starting new task 'TASK1'.
Import ...
Export...
You can ginve any name to this task.
If you want to debug it , execute ur code and when control reaches to FM , press F5 a new session will be opened .
Starting new task starts the code in new LUW. -
Problems with goods movements cancelling network confirmations
Hello experts,
I'm having some problems with goods movement when cancelling network confirmations.
I assign a component for a operation in the project builder (CJ20N). Then when I execute a confirmation for that operation in CN25 everything works correctly, I can assign the time for the confirmation and SAP automatically carries the component assigned to the operation. Once I have done the confirmation the goods movements and the hours have a correct account assignment.
The problem is that if I cancel this confirmation, the hours are correctly cancelled but the component is still there. If I try to cancel the goods movement with MIGO it is no possible because the system says that must be cancelled with the corresponding transaction (CN29) but, as I have said, the system does not cancel it.
On the other hand, If the goods movement goes to COGI transaction and then I post-process the error, If later I cancel the confirmation, everything works correctly.
Does anybody know why this could happen?
Thanks and regards
LauraHi
I think this question was raised earlier also. The best way is to allot a fixed time slot for your users so as to avoid clash. I suppose i explained that the master data of any material is stored at one place only and if you schedule a background job for this then all your good movement transaction will be in que and performed in orderly manner.
If automatic posting is not possible then use the time slot method.
Krishna -
I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
Thank you in advance,
LeftyThis was one solution from the socket programming forum, have you tried this??
public Thread MyThread extends Thread{
boolean active = true;
public void run(){
ss.setSoTimeout(90);
while (active){
try{
serverSocket = ss.accept();
catch (SocketTimeoutException ste){
// do nothing
// interrupt thread
public void deactivate(){
active = false;
// you gotta sleep for a time longer than the
// accept() timeout to make sure that timeout is finished.
try{
sleep(91);
}catch (InterruptedException ie){
interrupt();
} -
Problem with Threads and a static variable
I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
Code functionality:
A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
The problem as far I understand is:
Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
Thanks,
B.D.
Code:
private static volatile boolean bChanged = false;
private static Thread objMainProcess;
protected static void Init(){
objMainProcess = new Thread() {
public void run() {
while( objMainProcess == Thread.currentThread() ) {
GetState();
objMainProcess.setDaemon( true );
objMainProcess.start();
public static void initStatusTimer(){
if(objTimer == null)
objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
public void actionPerformed( java.awt.event.ActionEvent evt){
SetState();
private static void SetState(){
if( objMainProcess == null ) return;
synchronized( objMainProcess ) {
bChanged = true;
try{
objMainProcess.notify();
}catch( IllegalMonitorStateException e ) {}
private static boolean GetState() {
if( objMainProcess == null ) return false;
synchronized( objMainProcess ) {
if( bChanged) {
SendMessage();
bChanged = false;
return true;
try {
objMainProcess.wait();
}catch( InterruptedException e ) {}
return false;
}Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
Again as you said, There is a reason I can't call sendMessage() inside setState().
The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
Thanks,
B.D. -
Problem with threads running javaw
Hi,
Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
troy.troy,
Try and post a minimum code sample of your app which
does not work.
When using javaw, make sure you redirect the standard
error and standard output streams to file.
Graeme.Hi Graeme,
I dont understand what you mean by redirection to file? some of my code below.
The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
public class Server{
ServerSocket aServerSocket;
Socket dianosticsSocket;
Socket nPortExpress;
ClientListener aClientListener;
LinkedList queue = new LinkedList();
int port = 0;
int clientPort = 0;
String clientName = null;
boolean serverAlive = true;
* Server constructor generates a server
* Socket and then starts a client threads.
* @param aPort socket port of local machine.
public Server(int aPort, String aClientName, int aClientPort){
port = aPort;
clientName = aClientName;
clientPort = aClientPort;
try{
// create a new thread
aServerSocket = new ServerSocket(port) ;
// connect to the nPortExpress
aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
// aClientListener.setDaemon(true);
aClientListener.start();
// start a dianostic port
DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
// System.out.println("Server is running on port " + port + "...");
// System.out.println("Connect to nPort");
catch(Exception e)
// System.out.println("ERROR: Server port " + port + " not available");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
serverAlive = false;
System.exit(1);
while(serverAlive&&aClientListener.hostSocket.isConnected()){
try{
// connect the client
Socket aClient = aServerSocket.accept();
//System.out.println("open client connection");
//System.out.println("client local: "+ aClient.getLocalAddress().toString());
// System.out.println("client localport: "+ aClient.getLocalPort());
// System.out.println("client : "+ aClient.getInetAddress().toString());
// System.out.println("client port: "+ aClient.getLocalPort());
// make a new client thread
ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
// start thread
clientThread.start();
catch(Exception e)
//System.out.println("ERROR: Client connection failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end constructor Server
void serverExit(){
JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}// end class Server
*** connect to another server
public class ClientListener extends Thread{
InetAddress hostName;
int hostPort;
Socket hostSocket;
BufferedReader in;
PrintWriter out;
boolean loggedIn;
LinkedList queue; // reference to Server queue
Server serverRef; // reference to main server
* ClientListener connects to the host server.
* @param aHostName is the name of the host eg server name or IP address.
* @param aHostPort is a port number of the host.
* @param aLoginName is the users login name.
public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer) // reference to Server queue)
hostName = aHostName;
hostPort = aHostPort;
queue = aQueue;
serverRef = aServer;
// connect to the server
try{
hostSocket = new Socket(hostName, hostPort);
catch(IOException e){
//System.out.println("ERROR: Connection Host Failed");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);
System.exit(0);
} // end constructor ClientListener
** multi client connection server
ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
queue = aQueue;
addToQueue(this);
client = aSocket;
clientRef = aClientListener;
aDiagnostic = diagnostics;
} // end constructor ClientWorker
* run method is the main loop of the server program
* in change of handle new client connection as well
* as handle all messages and errors.
public void run(){
boolean alive = true;
String aSubString = "";
in = null;
out = null;
loginName = "";
loggedIn = false;
while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
try{
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
if(aDiagnostic){
out.println("WELCOME to diagnostics");
broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
out.println("WELCOME to Troy's Server");
broadCastDia("Connect : client "+client.getInetAddress().toString());
out.flush();
String line;
while(((line = in.readLine())!= null)){
StringTokenizer aStringToken = new StringTokenizer(line, " ");
if(!aDiagnostic){
broadCastDia(line);
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
else{
if(line.equals("GETIPS"))
getIPs();
else{
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
} // end while
catch(Exception e){
// System.out.println("ERROR:Client Connection reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);
try{
if(aDiagnostic){
broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
broadCastDia("Disconnect : client "+client.getInetAddress().toString());
out.flush();
// close the buffers and connection;
in.close();
out.close();
client.close();
// System.out.println("out");
// remove from list
removeThreadQueue(this);
alive = false;
catch(Exception e){
// System.out.println("ERROR: Client Connection reset failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end method run
* method run - Generates io stream for communicating with the server and
* starts the client gui. Run also parses the input commands from the server.
public void run(){
boolean alive = true;
try{
// begin to life the gui
// aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
// aGuiClient.show();
in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
while (alive && hostSocket.isConnected()){
String line;
while(((line = in.readLine())!= null)){
System.out.println(line);
broadCast(line);
} // end while
} // end while
catch(Exception e){
// System.out.println("ERRORa Connection to host reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
try{
hostSocket.close();
}catch(Exception a){
JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
alive = false;
System.exit(1);
} // end method run -
Problem with threads and camera.
Hi everybody!
I've a problem with taking snapshot.
I would like to display a loading screen after it take snapshot ( sometimes i
have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
I was trying to use threads but i didn't succeed.
I made this code:
display.setCurrent(perform);
new Thread(new Runnable(){
public void run() {
while((!performing.isShown()) && (backgroundCamera.isShown())){
Thread.yield();
notifyAll();
}).start();
new Thread(new Runnable(){
public void run() {
try {
this.wait();
} catch(Exception e) {
exceptionHandler(e);
photo = camera.snapshot();
display.setCurrent(displayPhoto);
}).start();This code is sometimes showing performing screen but sometimes no.
I don't know why. In my opinion performing.isShown() method isn't working correctly.
Does anyone have some idea how to use threads here?Hi,
I've finally managed to work this fine.
The code:
Object o = new Object();
display.setCurrent(perform);
new Thread(new Runnable(){
public void run() {
while(!performing.isShown()){
Thread.yield();
synchronized(o) {
o.notify();
}).start();
new Thread(new Runnable(){
public void run() {
try {
synchronized(o) {
o.wait(1);
} catch(Exception e) {
exceptionHandler(e);
photo = camera.snapshot();
display.setCurrent(displayPhoto);
}).start();
Maybe you are looking for
-
SAXException while generating stubs from WSDL
Hi Friends i am stuck in a problem for which i need your help. i am using the Axis wsdl2java tool to generate the client side stub classes. the wsdl which i was using was referring to the port http://localhost/hth/services/Client?wsdl i was running t
-
how to retrieve all datas that lost when i update my iphone4 to that 6.10 ios. i tried to look at may i tunes in my computer but it seems that i forgot to perform back ups since i purchased this phone 2yirs ago.. pls send me an advice..thank u.
-
Safari has stopped working (common problem?)
I can access the internet through a 4 port ethernet router via internet explorer, however, Safari fails to load home page and shows the working icon. I cannot access the preferences or any aspect of the program, have to force quit . I downloaded the
-
ITunes will not copy bought CD to Library
iTunes has copied CD 1 of 2 (purchased box set) to the Library but baulks at the second CD with the message "The file "1. Symphony" couldn't be converted. You do not have write access for your iTunes Music folder or a folder within it. To change perm
-
Subscribing to my iCloud iCal on employer's laptop
I have an iCloud account, I've successfully moved my personal calender from "on my mac" to the cloud and can see it on both my iMac and my iPhone. Now I would like to subscribe to my personal iCal calender to see it on my employer's MacBookPro(os10.