当前位置:网站首页>HR export data Excel VBA
HR export data Excel VBA
2022-06-26 15:06:00 【gavingxh】
Switch HR System , from sap Guide out ( use RH_STRUC_GET) Of After the data is sorted out
| 0 | 1 | O | 10000000 | jack | 1 | #N/A | |
| 1 | 2 | O | 10000006 | Board of directors | 2 | 10000000 | jack |
| 2 | 7 | O | 50007060 | Group vice president | 3 | 10000006 | Board of directors |
| 7 | 45 | S | 50007057 | Group vice president | 4 | 50007060 | Group vice president |
| 45 | 234 | P | 18000 | Chen | 5 | 50007057 | Group vice president |
| 2 | 8 | S | 20000008 | founder | 3 | 10000006 | Board of directors |
| 8 | 46 | P | 1 | Ruan | 4 | 20000008 | founder |
| 2 | 9 | S | 20000009 | Vice Chairman | 3 | 10000006 | Board of directors |
| 9 | 47 | P | 2 | Ruan | 4 | 20000009 | Vice Chairman |
| 9 | 48 | P | 3 | Ruan | 4 | 20000009 | Vice Chairman |
| 2 | 10 | S | 20000010 | Chairman of the board of directors | 3 | 10000006 | Board of directors |
| 10 | 49 | P | 66 | Zhao | 4 | 20000010 | Chairman of the board of directors |
| 2 | 11 | S | 20000011 | independent director | 3 | 10000006 | Board of directors |
| 11 | 50 | P | 42 | xu | 4 | 20000011 | independent director |
| 11 | 51 | P | 40000784 | Chen | 4 | 20000011 | independent director |
| 11 | 52 | P | 40000785 | king | 4 | 20000011 | independent director |
| 11 | 53 | P | 40000786 | thank | 4 | 20000011 | independent director |
| 1 | 3 | O | 50006566 | Jack shares | 2 | 10000000 | jack |
| 3 | 12 | O | 50006692 | Marketing management department | 3 | 50006566 | Jack shares |
| 12 | 54 | O | 50019311 | Deputy General Office | 4 | 50006692 | Marketing management department |
| 54 | 235 | S | 50006843 | Deputy general manager of marketing | 5 | 50019311 | Deputy General Office |
| 235 | 789 | P | 15 | Ruan | 6 | 50006843 | Deputy general manager of marketing |
| 235 | 790 | P | 1219 | lai | 6 | 50006843 | Deputy general manager of marketing |
| 235 | 791 | P | 4331 | The qin dynasty | 6 | 50006843 | Deputy general manager of marketing |
| 12 | 55 | O | 50006851 | secretary | 4 | 50006692 | Marketing management department |
| 55 | 236 | S | 50006850 | secretary | 5 | 50006851 | secretary |
| 236 | 792 | P | 10324 | gold | 6 | 50006850 | secretary |
The goal is
I want to make it

The exported organization has a parent-child relationship , adopt vlookup Bring it here name ,
To help people achieve results Wrote a short paragraph VBA
Sub runva01()
Dim i, j, itemi, itemj, strp, modvalue, orgstr, ordidstr, pup, pseqindx
itemi = 2
itemj = 10998
For i = itemi To itemj
modvalue = Cells(i, 3)
orgstr = ""
ordidstr = ""
If modvalue = "S" Then
Cells(i, 12) = Cells(i, 4)
Cells(i, 11) = Cells(i, 5)
pup = Cells(i, 1)
For j = 2 To i
If Cells(j, 2) = pup Then
If Cells(j, 3) = "O" Then
pseqindx = j
End If
End If
Next
While pup <> 0
orgstr = Cells(pseqindx, 5) & "/" & orgstr
ordidstr = Cells(pseqindx, 4) & "/" & ordidstr
For j = 2 To i
If Cells(j, 2) = pup Then
If Cells(j, 3) = "O" Then
pseqindx = j
End If
End If
Next
pup = Cells(pseqindx, 1)
For j = 2 To i
If Cells(j, 2) = pup Then
If Cells(j, 3) = "O" Then
pseqindx = j
End If
End If
Next
Wend
Cells(i, 9) = orgstr
Cells(i, 10) = ordidstr
End If
Next
End Sub边栏推荐
猜你喜欢

This is the graceful file system mounting method, which is effective through personal testing

Restcloud ETL extracting dynamic library table data

使用 Abp.Zero 搭建第三方登录模块(一):原理篇
![[solo π] ADB connects multiple mobile phones](/img/44/4bd88725434fb67c9237645f024071.png)
[solo π] ADB connects multiple mobile phones

TCP拥塞控制详解 | 1. 概述

ETL过程中数据精度不准确问题

Document 1

C语言刷题随记 —— 乒乓球比赛

Talk about the RPA direction planning: stick to simple and valuable things for a long time

Detailed explanation of C language programming problem: can any three sides form a triangle, output the area of the triangle and judge its type
随机推荐
Principle of TCP reset attack
Mathematical modeling of war preparation 30 regression analysis 2
This is the graceful file system mounting method, which is effective through personal testing
编译配置in文件
Naacl2022: (code practice) good visual guidance promotes better feature extraction, multimodal named entity recognition (with source code download)
The tablestack function of the epidisplay package of R language makes a statistical summary table (descriptive statistics of groups, hypothesis test, etc.), does not set the by parameter to calculate
teamviewer显示设备数量上限解决方法
R language uses ggplot2 to visualize the results of Poisson regression model and count results under different parameter combinations
Deploy the flask environment using the pagoda panel
SAP gui 770 下载
Minister of investment of Indonesia: Hon Hai is considering establishing electric bus system and urban Internet of things in its new capital
Pytorch深度学习代码技巧
Informatics Olympiad 1405: sum and product of prime numbers (thinking problem)
Halcon C # sets the form font and adaptively displays pictures
kubernetes的Controller之deployment
Is the QR code for account opening given by the manager of the securities firm safe? Who can I open an account with?
Use abp Zero builds a third-party login module (I): Principles
Use abp Zero builds a third-party login module (II): server development
Sikuli 基于图形识别的自动化测试技术
ETL过程中数据精度不准确问题