{"id":296,"date":"2024-04-22T16:46:51","date_gmt":"2024-04-22T16:46:51","guid":{"rendered":"https:\/\/www.aderp.com.mx\/wp\/?p=296"},"modified":"2024-04-22T16:46:51","modified_gmt":"2024-04-22T16:46:51","slug":"exit-validaciones-va01","status":"publish","type":"post","link":"https:\/\/www.aderp.com.mx\/wp\/sap\/exit-validaciones-va01\/","title":{"rendered":"Exit validaciones VA01"},"content":{"rendered":"\n<p>Para validaciones al guardar datos en la transaccion VA01 \/ VA02, se puede usar el FORM USEREXIT_SAVE_DOCUMENT_PREPARE del include MV45AFZZ.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \"VERIFICA SI ES UN MOVIMIENTO DE DEVOLUCION Y CHECA SI TIENE TRANSPORTE\n  IF VBAK-VBTYP = 'H'.\n    SELECT SINGLE VBELV FROM VBFA INTO IV_VBELN_ORG  \"OBTIENE EL NUMERO DE ENTREGA\n      WHERE VBELN = VBAK-VGBEL AND VBTYP_V = 'J' AND VBTYP_N = 'M'.\n      IF SY-SUBRC = 0.\n        SELECT SINGLE TKNUM FROM VTTP INTO IV_TKNUM \"OBTIENE SI ESTA EN UN TRANSPORTE\n          WHERE VBELN = IV_VBELN_ORG.\n          IF SY-SUBRC = 0.\n            SELECT SINGLE TKNUM FROM VTTK INTO IV_TKNUM \"OBTIENE SI AUN ESTA EN CURSO\n              WHERE TKNUM = IV_TKNUM AND STTEN NE 'X'.\n              IF SY-SUBRC = 0. \"SI LO ENCUENTRA MANDA ERRROR\n                IV_TEXTO = 'Factura en transporte &amp;T, no se puede devolver'.\n                REPLACE '&amp;T' WITH IV_TKNUM INTO IV_TEXTO.\n                MESSAGE IV_TEXTO TYPE 'E'.\n              ENDIF.\n          ENDIF.\n      ENDIF.\n\n\n  ENDIF.<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Para validaciones al guardar datos en la transaccion VA01 \/ VA02, se puede usar el FORM USEREXIT_SAVE_DOCUMENT_PREPARE del include MV45AFZZ.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[26,72,122,7,121],"class_list":["post-296","post","type-post","status-publish","format-standard","hentry","category-sap","tag-abap","tag-exit","tag-pedidos","tag-sap","tag-va01"],"_links":{"self":[{"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/posts\/296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/comments?post=296"}],"version-history":[{"count":1,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/posts\/296\/revisions\/297"}],"wp:attachment":[{"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/categories?post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aderp.com.mx\/wp\/wp-json\/wp\/v2\/tags?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}