ABAP 创建测试文件
使用 CG3Y 下载,可以改成下载txt到本地.
FORM CREATE_TESTFILE. DATA: L_BUFFER(65535), L_OFF LIKE SY-TABIX, L_LEN LIKE SY-TABIX, L_SUM LIKE SY-TABIX. FIELD-SYMBOLS: <L_SYM>. OPEN DATASET DSN FOR APPENDING IN TEXT MODE ENCODING DEFAULT. IF SY-SUBRC <> 0. MESSAGE S619 WITH DSN. EXIT. ENDIF. CLEAR: L_BUFFER, L_OFF. LOOP AT DYNPRO_FIELDS. L_LEN = DYNPRO_FIELDS-LENGTH. L_SUM = L_LEN + L_OFF. IF L_SUM > 65535 OR L_LEN = 0. MESSAGE A604 WITH 'CREATE_TESTFILE' L_SUM. ENDIF. ASSIGN L_BUFFER+L_OFF(L_LEN) TO <L_SYM>. <L_SYM> = DYNPRO_FIELDS-FIELDVALUE. ADD DYNPRO_FIELDS-LENGTH TO L_OFF. ENDLOOP. TRANSFER L_BUFFER TO DSN LENGTH L_OFF. CLOSE DATASET DSN. ENDFORM. "CREATE_TESTFILE
本人常年接收SAP运维和远程项目,ECC,S/4HANA,CRM,WDA.
远程人天可谈,终身售后,有活请联系V信:18925782767(问问题免费,欢迎交流!)
!!请关注本人技术分享公众号:SAP翔子(可扫头像二维码)
每天分享新知识,博客文章也会陆续整理并迁移至公众号,与您一起共同学习